debug1: identity file /home/gitlab-runner/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/gitlab-runner/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
TheseAbove lines suggest that .ssh/id_rsa
andexists (type 1
), but its public key (.ssh/id_rsa-cert.pub
files) for the user doesn't existor got some problems (type -1
).
MakeSo make sure the file /home/gitlab-runner~/.ssh/id_rsa
exists and its, has 600
permission, is owned by the user. And the gitlab-runner~/.ssh/id_rsa.pub
usermatches/belongs to the same identity (as per this post).
Here is a simple test to run as a sudo access user (e.g. root
):
sudo -u gitlab-runner sh -c 'cd; wc -l .ssh/id_rsa; stat .ssh/id_rsa; head -n1 .ssh/id_rsa'
See also: What does "key_load_public: no such file or directory" mean?