heroku permanently delete the account with terminal - heroku

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.

Related

Couldn't find github in keychain MacOS

August 13th, github no longer accepts password for git actions. So, to update the token, I would have to change the password field in the keychain (github keychain) to token as recommend.
But, Unfortunately I couldn't find my keychain related to github.
Where can I find the keychain for github, and edit it so that git actions works ?!
Have you tried to put your token as password for git action? When git asked for the password, just put your token as password.
If you have never logged in to GitHub yet, then you will not find GitHub in the keychain. Make sure when you generate token you checked all the scopes you need.
Assuming git config credential.helper does return osxkeychain, not finding github.com in it means: the helper is ready to cache your new credentials.
A new git push should display a prompt where you would enter your GitHub user account name, and your PAT (Personal Access Token).
Check first nothing was cached with:
printf "protocol=https\nhost=github.com"| git-credential-osxkeychain get
If it was, you could remmove it with the erase command:
printf "protocol=https\nhost=github.com"| git-credential-osxkeychain erase
I had the same problem and i solved that by connecting my github account via fork.
it will help you to solve this problem.
Just open KeyChain Access, then create a new entry >Passwords> click on the notepad symbol on the top right> in the keychain item name enter the url > then enter the username of the repo > copy the token into the password section.
First, you need to generate your PAT on GitHub.
Then go back to your terminal: run a git command, input your GitHub username and use your token in place of your password.
You can download github desktop - https://desktop.github.com/
You can signin with your github credentials and you can clone and push/pull your code.

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.

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.

Heroku No Such Account Error

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

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