Why can't git resolve the hostname when clicking on a valid SSH address?

I am deploying the application on Heroku, so I created the Heroku application from the repo and then made the git push heroku master . When I do this, he continues to give me an error:

 ! Your key with fingerprint xxx is not authorized to access heroku-app. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 

I tried different things, changing my SSH keys, including deleting them all and creating new ones. However, this gives me the same error. I added a key to Gerok.

Then I tried to run ssh -vT git@heroku.com:heroku-app.git , and the result was:

 OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: /etc/ssh_config line 53: Applying options for * ssh: Could not resolve hostname heroku.com:heroku-app.git: nodename nor servname provided, or not known 

I cannot understand what this error indicates. The hostname is definitely true. Is it possible that I do not have something that I need in the SSH configuration file? Any ideas would be fantastic, because today I spent many hours trying to get this to work to no avail.

+6
git git-remote ssh ssh-keys heroku
source share
2 answers

git@heroku.com:heroku-app.git is the SCP format for this ssh address.

It relies on the ~/.ssh/config file with the entry "heroku.com", which indicates the user, the actual host name and, if necessary, the private / public key.

 host heroku.com user git hostname heroku.com identityfile ~/.ssh/yourPrivateKey 

Again: heroku.com in ' heroku.com:heroku-app.git ' is not a host name: this is an entry in the ssh configuration file.
You can replace heroku.com with xxx : git push xxx:heroku-app.git if you have an xxx entry in the ~/.ssh/config file.

+9
source share

It will also be as simple as:

  • $ heroku login
  • $ heroku git: clone -a appname (this line is solved for me right here)
  • $ git add.
  • $ git commit -am "do better"
  • $ git push heroku master

after you made sure that $ heroku git: remote -a appname (the name does not conflict between heroku and git)

0
source share

All Articles