解决Smartgit中始终出现Please make sure you have the correct access rights问题

来源:互联网 发布:屏保制作软件 编辑:程序博客网 时间:2024/06/06 20:35

环境:ubuntu16.04

问题描述:使用SmartGit开始没有什么问题,但是由于好几天没有打开电脑(不知道是不是有更新或者系统bug)导致SmartGit中pull或者push都出现Please make sure you have the correct access rights......


如何解决:不知道具体原因,将Edit>>Preferences中Commands>>Authentication下Known credentials删除,删除后,再次pull代码出现connect to host github.com port 22: Connection timed out。发现这个在网上有解决办法

方法如下:

1>>>cd ~/.ssh

2>>>gedit config(创建一个config文件)

3>>>添加信息如下:

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

即可,重新打开SmartGit,然后push等操作即可。


阅读全文
0 0