git: Permission denied(publickey). fatal:Could not read from remote repository.
2015-04-01 21:38
537 查看
git生成ssh的命令
如果不设置密码的话,一路回车,使用默认值即可。
但是我敲完这条命令,按回车
出现那句话,Enter file in which to save the key(/c/Users/wk/.ssh/id_rsa):
其实id_rsa就是默认的文件,但是一开始我以为这是默认的路径呢,就输入了一个名字作为文件名。
结果用户主目录里没有生成.ssh文件夹,倒是多出两个文件。keyAgain和
keyAgain.pub.
当时我没有在意,将keyAgain.pub里内容的粘贴在gitHub的“Add SSH Key”后,接着输入命令
然后就报错了
原因就是id_rsa和id_rsa.pub应该在.ssh目录下,git push代码的时候默认从这里读取。
ssh-keygen -t rsa -C "your email"
如果不设置密码的话,一路回车,使用默认值即可。
但是我敲完这条命令,按回车
出现那句话,Enter file in which to save the key(/c/Users/wk/.ssh/id_rsa):
其实id_rsa就是默认的文件,但是一开始我以为这是默认的路径呢,就输入了一个名字作为文件名。
结果用户主目录里没有生成.ssh文件夹,倒是多出两个文件。keyAgain和
keyAgain.pub.
当时我没有在意,将keyAgain.pub里内容的粘贴在gitHub的“Add SSH Key”后,接着输入命令
git remote add origin git@github.com:你的git账户/learngit.git git push -u origin master
然后就报错了
原因就是id_rsa和id_rsa.pub应该在.ssh目录下,git push代码的时候默认从这里读取。
相关文章推荐
- git Permission denied (publickey). fatal: Could not read from remote repository.
- 遇到从github git clone不下来,报Permission denied (publickey). fatal: Could not read from remote repository.
- 初学Git_远程克隆github上项目被拒绝--Permission denied (publickey). fatal: Could not read from remote repository.
- git 中github clone "Permission denied (publickey). fatal: Could not read from remote repository."
- 【git】Permission denied (publickey). fatal: Could not read from remote repository.解决方案
- github clone "Permission denied (publickey). fatal: Could not read from remote repository."
- Permission denied (publickey) fatal:Could not read from remote repository
- git: fatal: Could not read from remote repositorygit: fatal: Could not read from remote repository
- Permission denied (publickey). fatal: Could not read from remote repository.
- Permission denied (publickey). fatal: Could not read from remote repository.
- git push -u origin master 出错 \Permission denied (publickey). fatal: Could not read from remote repo
- git认证证书问题解决方案(github clone "Permission denied (publickey). fatal: Could not read from remote reposi)
- Permission denied (publickey). fatal: Could not read from remote repository.
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct access rights.and the repository exists.
- 【git使用】Permission denied (publickey). fatal: Could not read from remote respository.解决办法
- 【github常见操作和常见错误】错误提示:Permission denied (publickey). fatal: Could not read from remote repository.
- Permission denied (publickey) fatal:Could not read from remote repository
- Permission denied (publickey). fatal: Could not read from remote repository.
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct acces
- Permission denied (publickey). fatal: Could not read from remote repository