服务器OpenSSH升级之后,gitlab clone失败,fatal: Could not read from remote repository

代码服务器OpenSSH从7.6版本,升级到8.7p之后,就无法从gitlab上拉代码。错误如下:

Cloning into 'test'...
Bad owner or permissions on /home/user/.ssh/config
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

查看config权限。问题原因:config文件权限太开放了

$ ll ~/.ssh/config 
-rw-rw-r-- 1 user user 114 6月  28 17:41 config

修改config文件权限为:600。问题解决。

$ chmod 600 ~/.ssh/config
$ ll ~/.ssh/config 
-rw------- 1 user user 114 6月  28 17:41 config

猜你喜欢

转载自blog.csdn.net/ljz0929/article/details/120335642
今日推荐