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

19.8k Views Asked by At

enter image description here

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.

5

There are 5 best solutions below

0
On

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 protected]': API KEYS

0
On

Run this

  1. heroku login
  2. git add .
  3. git commit -m "..."
  4. git push heroku main

This is going to work

0
On

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.

4
On

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.

2
On

This is what worked for me.

$ heroku auth:token

Use the result as the password when prompted.