2 ybdt1201 ybdt1201 于 2017.01.07 12:49 提问

git clone 时报错Permission denied (publickey)

下面是我生成ssh的全过程:
生成ssh:
图片说明
测试与GitHub网站是否联通:
图片说明
显示是可以联通成功的

使用ssh方式克隆项目:
图片说明
报错:
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to t
he list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

请问大师们,这是什么问题

1个回答

dead911
dead911   2017.01.08 08:23
已采纳

你这https://github.com/HZ-1/112是空的repository吧?

先自己创一个remote repository

echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:HZ-1/112.git
git push -u origin master

然后再clone

ybdt1201
ybdt1201 还是不成功
11 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!