Getting 'GitLab: The project you were looking for could not be found.' after upgrading to 8.15.4-ce
After upgrading gitlab-ce (I'm using omnibus package on Ubuntu 14.04 LTS Server) from version 8.14.5-ce.0 to 8.15.4-ce.1 (which was followed by a full VM reboot) I could no longer pull from my repos over SSH, all I got was:
~/Documents/gitrepo/hieradata $ git pull
GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
gitlab-shell log file contained:
I, [2017-01-16T10:04:38.966800 #5941] INFO -- : POST http://127.0.0.1:18080/api/v3/internal/allowed 1.65076
W, [2017-01-16T10:04:38.966962 #5941] WARN -- : gitlab-shell: Access denied for git command <git-upload-pack 'puppet/hieradata.git'> by user with key key-2.
The issue ceased to exist for this user after I logged in to the WebUI - no other action was required - I was able to pull as this user again. Tried that with a different user, the issue was also present, then I used the Impersonate feature rather than logging in and pulling also started working again.
I experienced this issue on a different instance a few days before, but must have fixed it for both my users by accident without knowing, but will probably experience it again on the last instance I'll be upgrading next week, so if there is any more debug info I should capture, please let me know.
gitlab-rake gitlab:env:info RAILS_ENV=production:
System information
System: Ubuntu 14.04
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.15.4
Revision: a0b1379
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://gitlab
HTTP Clone URL: https://gitlab/some-group/some-project.git
SSH Clone URL: git@gitlab:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 4.1.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
gitlab-rake gitlab:check RAILS_ENV=production:
Checking GitLab Shell ...
GitLab Shell version >= 4.1.1 ? ... OK (4.1.1)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
puppet / hieradata ... ok
puppet / sas-environments ... ok
puppet / webapp-environments ... ok
puppet / legacy-env-icinga-objects ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... skipped (no tmp uploads folder yet)
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: ...
puppet / hieradata ... yes
puppet / sas-environments ... yes
puppet / webapp-environments ... yes
puppet / legacy-env-icinga-objects ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.3)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.8.4)
Active users: 9
Checking GitLab ... Finished