After the server OpenSSH upgrade, gitlab clone failed, fatal: Could not read from remote repository

After the code server OpenSSH is upgraded from version 7.6 to 8.7p, the code cannot be pulled from gitlab. The error is as follows:

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.

View config permissions. Cause of the problem: config file permissions are too open

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

Modify the config file permission to: 600. problem solved.

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

Guess you like

Origin blog.csdn.net/ljz0929/article/details/120335642