我在一个使用代理访问网络的大学网络中。我无法通过ssh和https访问github。我设置了ssh_config也netrc,但出现了错误。请帮帮我?
git push -u origin master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
我的ssh配置文件
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
Host github.com
ProxyCommand /usr/bin/corkscrew 202.141.80.19 3128 %h %p ~/.ssh/myauth
User git
Port 443
Hostname ssh.github.com
TCPKeepAlive yes
IdentitiesOnly yes
我的netrc包含
`machine github.com
`username user@gmail.com`
`password password`
- 检查您的存储库配置:
git remote -v
应该为您提供以下表单的url:
git@github.com:yournick/yourproject.git
- 检查您的私人SSH密钥是否列在您的github帐户上。如果是,您应该能够执行
ssh git@github.com
,并看到以下内容:
Hi yournick! You've successfully authenticated, but GitHub does not provide shell access.
另请参阅:
- 此错误的相关帮助
- 通过HTTPS端口使用SSH(如果需要)