Skip to content

Instantly share code, notes, and snippets.

@zmts
Last active July 24, 2020 15:31
Show Gist options
  • Save zmts/be781a85af19f5bb2d58f98abd8959ff to your computer and use it in GitHub Desktop.
Save zmts/be781a85af19f5bb2d58f98abd8959ff to your computer and use it in GitHub Desktop.
Permissions for ssh/id_rsa

Permissions for ssh/id_rsa

Case 1

git clone git@gitlab.com:....git

fails with:

Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Solution:

chmod 400 ~/.ssh/id_rsa

Case 2

git clone git@gitlab.com:....git

fails with:

Cloning into '/var/www/'...
Host key verification failed.
fatal: Could not read from remote repository.

Solution:

chown superuser:superuser id_rsa id_rsa.pub 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment