¿Gitlab-shell arroja la request 404 para requestes de API internas?

Si lo hago ssh -T git@my-server estoy recibiendo

 Welcome to GitLab, Anonymous! 

Si hago git clone [email protected]gitlab.advantage4me.co:matthew/dummy.git estoy recibiendo

 Cloning into 'dummy'... Access denied. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 

Lo cual es extraño ya que la key existe, pero mirando en gitlab-shell.log me está dando

 API call <GET https://my-server/api/v3/internal/discover?key_id=1> failed: 404 => <{"message":"404 Not found"}>. 

Usar git clone a través de https funciona bien.

Ahora sé que no es un problema tener configurada la url incorrecta, ya que desde el mismo server que puedo hacer (tenga en count que copie y pegue ' my-server para garantizar que no haya errores tipocharts).

 wget https://my-server/api/v3/projects ?private_token=zogmVjiVBZcEn39Vx4qK 

¿Qué estaría causando esto, gitlab parece pensar que está funcionando bien?

 Checking Environment ... Git configunetworking for git user? ... yes Checking Environment ... Finished Checking GitLab Shell ... GitLab Shell version >= 1.7.9 ? ... OK (1.8.0) Repo base directory exists? ... yes Repo base directory is a symlink? ... no Repo base owned by git:git? ... yes Repo base access is drwxrws---? ... yes update hook up-to-date? ... yes update hooks in repos are links: ... Api / core ... repository is empty Matthew Hailwood / dummy ... ok Running /home/git/gitlab-shell/bin/check Check GitLab API access: OK Check directories and files: /home/git/repositories: OK /home/git/.ssh/authorized_keys: OK Test networkingis-cli executable: networkingis-cli 2.8.6 Send ping to networkingis server: PONG gitlab-shell self-check successful Checking GitLab Shell ... Finished Checking Sidekiq ... Running? ... yes Number of Sidekiq processes ... 1 Checking Sidekiq ... Finished Checking LDAP ... LDAP is disabled in config/gitlab.yml Checking LDAP ... Finished Checking GitLab ... Database config exists? ... yes Database is SQLite ... no All migrations up? ... yes GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Init script exists? ... yes Init script up-to-date? ... no Try fixing it: Redownload the init script For more information see: doc/install/installation.md in section "Install Init Script" Please fix the error above and rerun the checks. projects have namespace: ... Api / core ... yes Matthew Hailwood / dummy ... yes Projects have satellites? ... Api / core ... can't create, repository is empty Matthew Hailwood / dummy ... yes Redis version >= 2.0.0? ... yes Your git bin path is "/usr/bin/git" Git version >= 1.7.10 ? ... yes (1.8.3) Checking GitLab ... Finished 

Me encontré con esta pregunta ya que encontré el mismo error. Después de una gran cantidad de solución de problemas, esto funcionó para mí:

  1. Borre todas las keys autorizadas configuradas actualmente:

    sudo -u git -H bin / gitlab-keys clear

  2. Reinicie y configure el shell de GitLab:

    sudo -u git -H bundle exec rake gitlab: shell: configuration RAILS_ENV = producción

  3. Ingresa a GitLab con el browser y elimina las keys RSA de tu perfil de usuario

  4. Agrega tu key RSA nuevamente a tu perfil de usuario

Fuente: https://github.com/gitlabhq/gitlabhq/issues/4730#issuecomment-23219136