Git prompt for a password despite of passing all checks related with ssh key

Summary

git prompts for a password despite set ssh key properly and pass all checks. I added the key following generating-a-new-ssh-key-pair.

Steps to reproduce

I installed gitlab-ce using apt-get and make it works for localhost. Nginx serves it through proxy. I migrated database from old version. I do not remember specific version of previous version I used but gitlab works properly except for this issue. And SSH server is working at 8080 port.

What is the current bug behavior?

git prompts for a password.

What is the expected correct behavior?

git works without prompting for a password.

Relevant logs and/or screenshots

$ git remote -v
origin	https://gitlab.example.com/some-group/some-project.git (fetch)
origin	https://gitlab.example.com/some-group/some-project.git (push)
$ git fetch
Username for 'https://gitlab.example.com':
$ sudo gitlab-rake gitlab:check SANITIZE=true
...
Git user has default SSH configuration? ... yes
...
$ sudo /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK
$ sudo tail /var/log/gitlab/gitlab-shell/gitlab-shell.log
...
I, [2017-10-20T03:06:45.248906 #30787]  INFO -- : Adding key key-19 => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDN/KPJwLRak1nI9dalEX98jUnAHboMNAfd1dJ4lD4uosV0ocL/vEeWmO/KIrSmGSW3MuyC7Meoi9YNDIQTEMhufZvMi2TGIs8D7S7H9mMrAWJ9I5p51QDbSSSEvGek1v/kwcf3/Qmt2EBm/r/1sEP3Ev+LDjrobbMYwRW4+nLJaXUYqwLmJlvchRjJJMid1VtBqKqHDwi+spVRnBo6p7YmAnsiUMt7CrugQbnWIpIVYvf9Bfw5rm8rXcv2Iq3dyF8OBjEupNc76Q+Pgl1HO5bDLaJvQ2yF06GlqUqckXdQr2t/W5SURhO+Vtq6M/q7oiCSV/82lNUdPX1HkBXkq8xn8g9xfeE7QRptyFH43MYto+/KnF3v1R1wiBS89/sncIJTwHzatU+eyvdl5yxtJdzbUD/ToAzS6mdn3sc7TSXgo5vDzotSVQuGm3xBSaH+eVLU62J44ivm2pyPLmhjkSI/37zC/UkxUipoG7Ytx9pGxobbgEFPweQqR/x3gQ+8qpvtSlGdf0U8eixW/bV1m2n9+33FZelvA9l2Tz1hPeGalkyYW39hShWJMFSO/AYmXq41SfsSwts1HUBH9htIoQE1NyPz3JEH+5ESUVWWOAN6yF+WrEPakmNAocYUltMIV+bvHbg0MSREqUxNdZ6NuppfJB4BgSKOM7inf/VFGKzhcQ=="
...
$ sudo cat /etc/gitlab/gitlab.rb
...
external_url 'https://gitlab.example.com'
...
nginx['redirect_http_to_https'] = false
nginx['listen_addresses'] = ['127.0.0.1']
nginx['listen_port'] = 8000
nginx['listen_https'] = false
nginx['proxy_set_headers'] = {
  "X-Forwarded-Proto" => "https",
  "X-Forwarded-Ssl" => "on",
}
$ sudo cat /etc/nginx/site-available/gitlab
server {
    listen 80 default_server;
    listen [::]:80 default_server;

    server_name gitlab.example.com;

    location / {
        return 301 https://$server_name$request_uri;
    }
}

server {
    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

    server_name gitlab.example.com;

    # here is ssl settings...

    location / {
        proxy_redirect          off;
        proxy_set_header        Host $http_host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-Proto $scheme;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_read_timeout      300;
        proxy_connect_timeout   300;

        proxy_pass              http://localhost:8000;
    }
}

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:		Ubuntu 16.04
Current User:	git
Using RVM:	no
Ruby Version:	2.3.5p376
Gem Version:	2.6.13
Bundler Version:1.13.7
Rake Version:	12.0.0
Redis Version:	3.2.5
Git Version:	2.13.5
Sidekiq Version:5.0.4
Go Version:	unknown

GitLab information Version: 10.0.3 Revision: 8895150 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://gitlab.example.com HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git SSH Clone URL: git@gitlab.example.com:some-group/some-project.git Using LDAP: no Using Omniauth: no

GitLab Shell Version: 5.9.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab Shell ...

GitLab Shell version >= 5.9.0 ? ... OK (5.9.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 16/2 ... ok 13/3 ... ok 3/5 ... ok 46/10 ... repository is empty 53/11 ... ok 53/12 ... ok 54/16 ... ok 13/18 ... ok 16/20 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

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: ... 16/2 ... yes 13/3 ... yes 3/5 ... yes 46/10 ... yes 53/11 ... yes 53/12 ... yes 54/16 ... yes 13/18 ... yes 16/20 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.5) Git user has default SSH configuration? ... yes Active users: ... 55

Checking GitLab ... Finished

Edited by Junsang Cheon