git使用中的问题

git使用中的问题

  1. 在执行git fetch的时候,出现以下错误:
Bad owner or permissions on /home/haowt/.ssh/config

​ 这个时候,只需要在.ssh目录,执行以下命令行:

sudo chmod 600 config
  1. 出现如下错误:
The authenticity of host 'gitee.com (116.211.167.14)' can't be established.

在新生成密钥之后,在.ssh文件夹(之前的文章有提到过)中少了一个known_hosts文件,本来密钥文件应该是三个,现在是两个,便报了这样的错误,此时选择yes回车之后,便可,同时生成了缺少了的known_hosts文件

  1. 出现Permissions 0777 for '/home/majia/.ssh/mymayunrsa' are too open错误
Warning: Permanently added the ECDSA host key for IP address '116.211.167.14' to the list of known hosts. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0777 for '/home/majia/.ssh/mymayunrsa' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "/home/majia/.ssh/mymayunrsa": bad permissions git@gitee.com: Permission denied (publickey). Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists.

解决办法:

sudo chmod 600 文件路径
  1. 出现Invalid authentication data.connection.contentType must not be null错误

    没有解决用私人令牌token登录成功

  2. Permission denied (publickey,gssapi-keyex,gssapi-with-mic

    参考https://www.cnblogs.com/softidea/p/5447539.html

    私钥放到客户端,服务端放(要登录的主机)id_rsa_pub文件并添加到文件“authorized_keys”尾部

    这是利用公钥验证

    参考:https://help.github.com/articles/testing-your-ssh-connection/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容