I can't push to/clone from a GitLab running on an Amazon EC2 instance. Here is what I did so far
When I try to clone that repository via git clone [email protected]:project-group/project.git
I get the infamous message:
Permission denied (publickey).
How can I configure my EC2-instance to accept clone/push/pull requests from users who added their SSH-keys via Gitlabs web-interface?
User ubuntu
? Usually, the user configure for a GitLab instance is git
.
Try and modify your .ssh/config file with User git
, and use that url:
git clone myhost:project-group/MyRepo.git
Make sure that test.pub
(the public key extracted from the pem file) is registered properly on the repo (or in your GitLab account, if you are the owner of that repo). If test.pem
is the key used to access the EC2 instance, then you would need to generate a separate public/private set of keys and use those instead in accessing GitLab.
After discussion below, it appears that:
gitlab-rake some_task
(not 'rake
' directly)gitlab-rake gitlab:check
points out that the authorized_keys
file resides in /var/opt/gitlab/.ssh/authorized_keys
git
account was locked (unlocking it made the Gitlab work: git:!:
to git:*:
in the file /etc/shadow
).