Clone over ssh ask me password, even if public repository
Summary
Today I generated a new ssh key for one of my server which need to git clone a private repo on my Gitlab CE on-premise. I've added ssh public key on deploy keys but nothing to do, impossible to clone or even ssh -Tv git@mygitlabhere.com, it still ask me password.
If I use on of my keys which was already registered in my Gitlab all works fine.
Steps to reproduce
- ssh-keygen
- copy id_rsa.pub in https://mygitlabhere.com/profile/keys
- ssh -Tv git@mygitlabhere.com
Example Project
My Gitlab CE instance :
GitLab 12.9.0 (9a382ff2) GitLab Shell 12.0.0 GitLab Workhorse v8.25.0 GitLab API v4 Ruby 2.6.5p114 Rails 6.0.2 PostgreSQL 10.12
What is the current bug behavior?
When I want to git clone it still ask me for a password (my ssh key have no passphrase) even for my public repositories.
What is the expected correct behavior?
I can clone without any problem.
Relevant logs and/or screenshots
Test with a public repo :
root@gitlab-master-ubu-nur-001:~# git clone git@mygitlabhere.com:KrustyHack/test.git
Cloning into 'test'...
git@mygitlabhere.com's password:
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Current User: git Using RVM: no Ruby Version: 2.6.5p114 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.7 Git Version: 2.24.1 Sidekiq Version:5.2.7 Go Version: unknown GitLab information Version: 12.9.0 Revision: 9a382ff2c82 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.12 URL: https://mygitlabhere.com HTTP Clone URL: https://mygitlabhere/some-group/some-project.git SSH Clone URL: git@mygitlabhere:some-group/some-project.git Using LDAP: no Using Omniauth: no GitLab Shell Version: 12.0.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 12.0.0 ? ... OK (12.0.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 3/1 ... yes 3/3 ... yes 4/4 ... yes 5/5 ... yes 1/6 ... yes 6/7 ... yes 8/8 ... yes 9/12 ... yes 11/13 ... yes 5/15 ... yes 13/16 ... yes 17/20 ... yes 18/21 ... yes 13/22 ... yes 19/23 ... yes 19/25 ... yes 16/26 ... yes 21/28 ... yes 19/29 ... yes 19/30 ... yes 17/31 ... yes 24/33 ... yes 26/34 ... yes 27/35 ... yes 28/36 ... yes 33/37 ... yes 34/38 ... yes 1/39 ... yes 36/42 ... yes 37/43 ... yes 39/44 ... yes 40/46 ... yes 40/47 ... yes 41/48 ... yes 43/49 ... yes 44/50 ... yes 44/52 ... yes 44/53 ... yes 44/54 ... yes 42/56 ... yes 13/57 ... yes 45/58 ... yes 22/59 ... yes 44/60 ... yes 48/61 ... yes 1/62 ... yes 49/65 ... yes 11/66 ... yes 11/67 ... yes 11/68 ... yes 52/70 ... yes 1/71 ... yes 1/72 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.5) Git version >= 2.22.0 ? ... yes (2.24.1) Git user has default SSH configuration? ... yes Active users: ... 1 Is authorized keys file accessible? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)