ssh - git clone及git push错误
淡淡烟草味
淡淡烟草味 2017-05-02 09:37:00
0
2
809

git clonegit push origin master 错误

错误信息:

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$ 

尝试的解决方案:
sudo vim ~/.ssh/config:

Host github.com
User 158099591@qq.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

已经在github上添加了ssh
卸载重装了ssh
重新编译了git最新版本(今天早上2点down的)

系统信息:

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

其他信息

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

难道是系统问题么?

Email:158blackhole@gmail.com

问题已解决:
我删除github上面的ssh key。重新在debian里生成一个key,覆盖之前的key文件,然后再修改~/.ssh/config。就行了。参考链接:
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

折腾了一天终于搞定了=-=,不过我之前也有这么干,但是没成功。今天居然成功了。没办法有些时候还真的要拼RP、YZ

淡淡烟草味
淡淡烟草味

모든 응답(2)
曾经蜡笔没有小新

Github의 SSH 공개 키가 일치하지 않을 수 있습니다. 확인하세요

Peter_Zhu

@hsfzxjy의 ssh -vT 제안에 답변 git@github.com

으아아아
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!