2

I have a bunch of errors while connecting my git. Let see:

  • git push -u origin --all

1

  • ssh -vT git@github.com 2 Then
  • More investigation

3

What else can I do?

Anshul Goyal
  • 73,278
  • 37
  • 149
  • 186
  • Github does not let you in. Did you set up your public/private keys for github as described here https://help.github.com/articles/generating-ssh-keys ? In the first picture you seems to have trouble unlocking your private key with a password. On the second picture, SSH was able to access your id_rsa/id_dsa, but github didn't accept them. Make sure that you've added correct public key on github. It must match content of id_dsa.pub or id_rsa.pub in your ~/.ssh/ – ArtemB Apr 23 '14 at 00:56
  • I generated the SSH keys from bitbucket at https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git.And I run the command $ ls -a ~/.ssh. It listed the result as . .. id_rsa id_rsa.pub known_hosts –  Apr 23 '14 at 01:21
  • That step only created a public/private pair of keys. Now you need to put content of .pub file as your public key on guthub's site. – ArtemB Apr 23 '14 at 03:46

1 Answers1

1

You need to add the content of your public key ~/.ssh/id_rsa.pub to your GitHub SSH keys page.

https://github-images.s3.amazonaws.com/help/settings/ssh-key-paste.png

If GitHub knows of your public key, then ssh -Tv git@github.com will work.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • -@VonC, It seems to be working. I got a message such as `Hi, xxxx, You've successfully authenticated, but GitHub does not provide shell access.` Then I run the command:`eval ssh-agent -s`. It showed:`"SSH_AUTH_SOCK=/tmp/ssh-XawohD5796/agent.5796; export SSH_AUTH_SOCK; SSH_AGENT_PID=5356; export SSH_AGENT_PID; #echo Agent pid 5356;"` Then I run the command `ssh-add ~/.ssh/id_rsa.pub`, I got `Could not open a connection to your authentication agent.`. Why I got this error? –  Apr 23 '14 at 12:26
  • using `git push -u origin --all` still failed. `Permission denied (publickey)` –  Apr 23 '14 at 12:49
  • @Love does your private key has a passphrase associated to it? – VonC Apr 23 '14 at 13:01
  • -@VonC, I have one but I don't remember it correctly. I just tried twice, I believe that one of them should be correct. The two results are different: One was- No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master'.fatal: The remote end hung up unexpectedly. The second try was giving me three times to input the passphrase, then denied as I mentioned before. –  Apr 23 '14 at 13:22
  • @Love I would recommend to resolve first the ssh-add issue, and make sure the right passphrase is store in your agent. Then we can focus on git commands. – VonC Apr 23 '14 at 13:23