Heroku No Such Account Error - heroku

To start:
I am able to log in to heroku with my email and password.
When logging into heroku through my terminal using the same email and password credentials I get the following error.
heroku login
Email: myemail#email.com
Password:
No such account: myemail#email.com

check your [Project Root]/.git/config
There are some heroku accounts specific settings:
[heroku]
account = <account name>
you can delete those two lines and then try to login again
Just save what you delete :)

Try to remove the existing account credentials rm -rf ~/.heroku/plugins/heroku-accounts and do heroku login enter your credentials

Try making sure you have the latest version of the heroku gem/toolbelt installed.

Check your .git/config for references to remotes like 'git#heroku.account' and remove those.
Also, check your ~/.ssh/config for references to that 'account' and take them out.
Then, re-do your auth heroku auth:logout and heroku auth:login and maybe heroku keys:add to get everything set back up.

I think the problem is a conflict between Heroku toolbelt and the Heroku gem. I also had the same problem. Read this article to solve it - http://bit.ly/1sku20D

Related

Heroku : Username for 'https://git.heroku.com': git

I'm trying to check a git remote on heroku:
$ heroku auth:logout
Local credentials cleared.
$ heroku auth:login
Enter your Heroku credentials.
Email: ***#gmail.com
Password (typing will be hidden):
Authentication successful.
$ git remote
heroku
origin
$ git remote show heroku
Username for 'https://git.heroku.com':
Password for 'https://git.heroku.com':
remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry the git command.
fatal: Authentication failed for 'https://git.heroku.com/***-1909.git/'
This error is referenced in the heroku docs, in the screenshot above at https://devcenter.heroku.com/articles/git , but I'm not sure what to do next to fix this.
This is what worked for me.
$ heroku auth:token
Use the result as the password when prompted.
As the warning says, you just need to do:
heroku login
And it will open your browser for logging in, enter details as per your authentication and you will be good to roll in.
I solve this issue no implicit conversion from nil to integer (TypeError) by it by pushing the updates to heroku and when they asked for the user name I added my email and the password it's in this link https://dashboard.heroku.com/account in API KEYS
Username for 'https://git.heroku.com': your email
Password for 'https://email#git.heroku.com': API KEYS
Run this
heroku login
git add .
git commit -m "..."
git push heroku main
This is going to work
After logged with: heroku login
Some access for example on cloning an existing project in your account, is not
allowed using git native even stay you logged in, and only using git from heroku, such as:
heroku git:[command]
an example clonning a repository:
heroku git:clone -a [app_name]
Otherwise, sometimes, after logged with heroku login, you can check your remote git with: git remote -v
Other way, is you use heroku auth:token and use their output as password, of course, run it after logged.

Multiple accounts heroku keys mixed up

I have multiple accounts on heroku and I think my ssh keys got messed up but I have no idea how to fix it.
When i try 'git push heroku master' i get the error 'your account ***** does not have access to *****'
How do I fix my keys so that I can push to heroku?
Heroku wont allow to share ssh key between 2 heroku accounts.
I will help you to get through this by a hacky fix
1.First go to .ssh/ directory in your home folder
2.Move all the files and keep it in any other folder(Don't delete it)
3.Open the terminal and Login to heroku using "heroku login" command and login to your heroku account which you want to push now.
4.After sucessfully logging in to your account enter "heroku keys:add" command. it will create a new ssh keys for your account. you can now push to your account easily.
Suppose if you want to push to any application using your old account replace the .ssh/ folder files to backuped files. (Backup your current .ssh/ to any folder)
or you can repeat same step 1-4 for that account.
I hope this will solve your problem.

heroku permanently delete the account with terminal

I would remove the heroku login with the terminal so I use the command:
heroku accounts: remove mylogin
but he told me: That account is the current account, set Reviews another account first.
How to remove the login?
thanks
You can go to ~/.heroku/accounts and remove the files in their that correspond to the account you want to remove.

Authentication failure in Heroku CLI after password change

After a password change on heroku's website, I can't access the heroku api.
When I do heroku login, I get Authentication successful, even though it shouldn't because the password has changed. It doesn't even ask for my email or password, like it should!
If I try heroku apps (or any other application related command), I get Authentication failure.
If I try heroku status, it works.
I don't have any plugins installed.
Logs:
$ heroku version
heroku-gem/3.6.0 (i686-linux) ruby/2.1.0
$ heroku logout
Local credentials cleared.
$ heroku login
Authentication successful.
$ heroku apps
Authentication failure
$ heroku plugins
You have no installed plugins.
I'll appreciate any help or ideas I can get. I already opened a ticket and waiting for the Heroku Support to get back to me.
Thanks
After a password change on heroku's website, I can't access the heroku api.
Are you using the heroku-accounts plugin? If so, try uninstalling it.
heroku plugins:uninstall heroku-accounts
rm -r ~/.heroku/accounts
heroku logout
heroku login
https://github.com/ddollar/heroku-accounts/issues/56
Apparently, changing the password for heroku regenerates a new API key, and I had the wrong HEROKU_API_KEY configured. (It regenerates a new one after password change).
I'm posting here the response from the great Heroku's support team, which gave me these suggestions:
Is there a ~/.netrc file on your computer? If there is, can you please check if the file contains something Heroku related things? Please remove if there is, and try login again.
Is there an HEROKU_API_KEY environment variable defined on your machine? If yes, could you remove it and login try again?
Is there a ~/.heroku/credentials file (with or without an extension) on your machine? If yes, could you remove it and try login again?
Finally, if none of those work, could try the following command: GEM_HOME='' BUNDLE_GEMFILE='' GEM_PATH='' RUBYOPT='' heroku login and see how it goes?
Are you using the heroku-accounts plugin? If so, try uninstalling it.
You may not need to uninstall it...
Make sure you are not in a project directory (or you may run into the "account not found" loop).
cd
List your accounts.
heroku accounts
On each account where the password was changed
heroku accounts:remove ACCOUNT
heroku accounts:add ACCOUNT
(I did not need to do anything with the ~/.ssh/config.)
Reset your default account, if needed.
heroku accounts:default ACCOUNT
If you changed the account name or git config --unset heroku.account.
cd /path/to/your/project
git config --add heroku.account ACCOUNT
I didn't want to give up on the heroku-accounts plugin. :)
heroku accounts:remove personal or whatever account name you have
git config --unset heroku.account
heroku accounts:add personal then login
In my case, I had multiple heroku accounts managed by heroku-accounts gem and authentication started failing after I changed one of my account's password.
Steps I followed to make things normal again:
Removed the account (that's failing to authenticate) from heroku accounts:
heroku accounts:remove account_name
Opened up a new terminal and then added the account again that I just deleted:
heroku accounts:add account_name --auto
Here you have to use your new credentials.
That's it. Problem solved.
Try deleting ~/.netrc (this is where the Heroku CLI tool saves the auth tokens) and starting over.

ssh key fingerprint error when trying to switch heroku accounts

i often need to switch heroku accounts and use a script which does the following:
heroku keys:clear && rm ~/.heroku/credentials && heroku list
after which i need to enter my credentials for the account i want to switch to:
Enter your Heroku credentials.
Email: fake#gmail.com
Password:
Uploading ssh public key /Users/fake/.ssh/id_rsa.pub
! Fingerprint already exists. Please use one ssh key per Heroku account
unfortunatelly i canĀ“t get passed this error.
any help much appreciated.
remove the heroku credentials
rm ~/.heroku/credentials
And then upload the key manually
heroku keys:add ~/.ssh/otheraccount.pub
Enter your Heroku credentials and thats it!!
Dont use the same ssh key for mutiple accounts. Please use one ssh key for one account.
For more info to fix this problem you can refer to http://martyhaught.com/articles/2010/12/14/managing-multiple-heroku-accounts/
strangely enough i could solve the problem with:
clearing the keys, deleting credentials switching to other accounts and back again.

Resources