在github添加了ssh-key,本地ssh-key已生成在~/.ssh
目录下了
# bash
ls ~/.ssh
id_rsa id_rsa.pub
在git bash
下使用git pull
时提示以下错误
git pull
ssh: connect to host github.com port 22: Operation not permitted
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
补充:
win10系统下,使用的是git-v2.9,终端使用git bash
请问如何设置才能正常使用?
======[2017-08-28 补充]===================================================
用ssh链接本地虚拟机都是提示port 22: Operation not permitted
,我可以十分肯定是ssh出现问题了。。。请问哪位知道如何解决?
======[2017-08-28 补充]===================================================
原来是傻B防火墙更新后拦截了ヽ(;´Д`)ノ
一、检查GitHub是否添加正确的秘钥。
二、检查sshkey是否是在git-shell环境下。
三、检查git remote 是 ssh 还是 https