git clone
and git push origin master
errors
Error message:
black-hole@IMP:~/test$ git clone git@github.com:BlackHole1/WebRtcXSS.git正克隆到 'WebRtcXSS'...
Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
black-hole@IMP:~/test$ sudo git push origin master[sudo] password for black-hole:
ssh: connect to host github.com port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
black-hole@IMP:~/test$
Solutions tried: sudo vim ~/.ssh/config
:
Host github.com
User 158099591@qq.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
Already added ssh on github
Uninstalled and reinstalled ssh
Recompiled the latest version of git (down at 2 o'clock this morning)
System information:
Linux version 3.16.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.36 -1 (2016-07-04)
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.5 (jessie)
Release: 8.5
Codename: jessie
Other information
black-hole@IMP:~/deb$ git --version
git version 2.9.0.GIT
black-hole@IMP:~/deb$ ssh -V
OpenSSH_6.7p1 Debian-5+deb8u2, OpenSSL 1.0.1t 3 May 2016
Is it a system problem?
Email: 158blackhole@gmail.com
Problem solved:
I deleted the ssh key on github. Regenerate a key in Debian, overwrite the previous key file, and then modify ~/.ssh/config. That's it. Reference link:
https://www.chenyudong.com/archives/ssh-using-private-public-key-no-password.html http://www.01happy.com/ssh-unprotected-private-key-file/ http://blog.sina.com.cn/s/blog_6e3583590101dvlx.html
After struggling for a day, I finally got it =-=, but I have done this before, but it didn’t work. It actually worked today. I can’t help but sometimes I really have to fight for RP and YZ
The ssh public key on your github may not correspond, check it
Answer to ssh -vT git@github.com proposed by @hsfzxjy