GitLab ssh Direitos de acesso do usuário

0

Estou executando uma versão do GitLab que instalei no outono passado. Infelizmente, não consigo determinar um número de versão. Está hospedado no Ubuntu 1404 em uma VM em um host Win10. ATUALIZAÇÃO: Parece ser rev 9.4.3-ce.0 e é o mais recente disponível a partir dos servidores de pacotes do Ubuntu.

Estou me recuperando de um desastre que exigiu uma reinstalação fria do Win10. Eu tenho a VM instalado e funcionando no VirtualBox. Minhas credenciais de login do GitLab parecem funcionar bem - eu posso fazer login no servidor e clonar meus projetos usando http. O que eu não posso fazer é acessar o servidor via ssh. Devo acrescentar que antes do desastre tudo funcionou bem.

A partir do msys bash eu posso usar ssh na VM, mas todas as tentativas de acessar o GitLab via ssh provocam o seguinte:

$ git push origin dev-5-1-0
fatal: 'git@elm-ub1404/xxx/program.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Eu verifiquei que a chave em Configurações / ssh-keys do GitLab é a correta. Até o apaguei e depois o adicionei de volta, sem sucesso.

O arquivo de log, gitlab-shell.log, contém o seguinte:

W, [2017-08-07T22:58:00.754776 #23099]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git receive-pack 'user/program.git'> by user with key key-1.
W, [2017-08-07T23:03:07.060909 #23937]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git receive-pack 'user/program.git'> by user with key key-1.
W, [2017-08-07T23:05:51.418158 #24333]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git receive-pack 'user/pruProgram.git'> by user with key key-1.
W, [2017-08-07T23:08:33.799837 #24841]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git receive-pack 'user/pruProgram.git'> by user with key key-1.
W, [2017-08-07T23:09:22.509888 #25006]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git receive-pack 'user/pruProgram.git'> by user with key key-1.
W, [2017-08-07T23:13:57.921136 #25626]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git receive-pack 'user/pruProgram.git'> by user with key key-1.
W, [2017-08-07T23:19:01.909144 #26864]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git upload-pack 'user/pruProgram.git'> by user with key key-1.
W, [2017-08-07T23:22:22.732120 #27344]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git upload-pack 'user/pruProgram.git'> by user with key key-1.
I, [2017-08-07T23:44:11.110398 #30251]  INFO -- : Adding key key-2 => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDITEDPYSbseUrbFW3Ii5dcKi6g4BJXi0U3yiK81NwXGcXGHMJCjlHNhblssetztc3xLuugK7syG+Sapt3kDvGzcOTi3NFrpYpv5y7RPlNVMBsgC+hSdsX3u6TZMuoSAByfgNK+DEkSGkgelrp6XIUWR4C4urLcxDqK7TFMM3xYF0JiE7t3lLRR7T8o+UY8gXozrmHyZout1CHpNv3OY9JDdj7V6+KjKAuVplJaqsx9zAh5sF7aGCUHUM5DESriLUjqgEgc+tZ4s31PPdgnhkX0Scm8M2405vnwLqIJ2a3qmpAwvOcM/rC/LTOJg4k7tjDtCEOr7v5usBNZwsUeiuuD"
W, [2017-08-07T23:48:40.016559 #30875]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git upload-pack 'user/pru6c.git'> by user with key key-1.
W, [2017-08-08T09:02:52.468088 #3630]  WARN -- : gitlab-shell: Attempt to execute disallowed command <git upload-pack 'user/pru6c.git'> by user with key key-1.
I, [2017-08-08T09:04:31.179381 #3828]  INFO -- : Removing key key-2
I, [2017-08-08T09:04:36.470186 #3852]  INFO -- : Removing key key-1
I, [2017-08-08T09:05:17.803599 #3942]  INFO -- : Adding key key-3 => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRFtPPqEGtCrgUHD+Q/WJcNKxOGm3h+paLQM9TOoDBQLG4HBb9cHoMPLEcX2USNy2TYaOIRQ8eCNu1O+E2u5RZWjG3rC35ygq5qu7LZH6Eed6vOGp5runWtyGsua3AQlJvu0FK247QeQaKnAmF77CqISW2ul0VDOp+Jw7KtfEf6r0smkkNEG7OpK5Cgjx7MZMNEN1Qsp8AzphcbLOTFNLR4oy+yMDUdtG9WDZEZKJmhpt0VeG1WAVHpxanLwza3fNG/Kwb2s6NolDD6CQAWaqM63wYh3HbU2m/S6kcLaAs1WDE0VIiVfIjoEMhnYVrcMKS6qAWYbjgJ7N5Dvq3JCXr"

Por alguma razão, minhas tentativas de acessar o repositório após excluir e substituir a chave original (excluída a chave-1 e inserida novamente como chave-3) não provocam mais mensagens de log no gitlab-shell.log.

Quando eu faço "ssh -Tv git @ elm-ub1404, eu recebo o seguinte:

OpenSSH_7.5p1, OpenSSL 1.0.2k  26 Jan 2017
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to elm-ub1404 [192.168.55.230] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to elm-ub1404:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:p7T0NBYGy8Jwuv1OH3bIvuykgiqypAxfUXoVtqQoh8Q
debug1: Host 'elm-ub1404' is known and matches the ECDSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:23
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/user/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to elm-ub1404 ([192.168.55.230]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: exec
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: No xauth program.
Warning: No xauth data; using fake authentication data for X11 forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Remote: X11 forwarding disabled in user configuration file.
X11 forwarding request failed on channel 0
Welcome to GitLab, Bob Duffy!
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2800, received 3080 bytes, in 2.3 seconds
Bytes per second: sent 1219.8, received 1341.7
debug1: Exit status 0

Então, minhas perguntas são:

  1. Como obtenho mais informações sobre a conexão do git-ssh?
  2. Como recupero o acesso do ssh ao GitLab?

ATUALIZAÇÃO:

Só para ter certeza, estou copiando as referências de repositório da página do projeto GitLab:

Elm-10:~/gitlabTest$ git clone git@elm-ub1404:rlduffy/program.git
Cloning into 'program'...
Warning: No xauth data; using fake authentication data for X11 forwarding.
X11 forwarding request failed on channel 0
GitLab: Disallowed command
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Elm-10:~/gitlabTest$ git clone http://elm-ub1404/rlduffy/program.git
Cloning into 'program'...
remote: Counting objects: 4760, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 4760 (delta 8), reused 0 (delta 0)
Receiving objects: 100% (4760/4760), 3.09 MiB | 19.54 MiB/s, done.
Resolving deltas: 100% (3542/3542), done.
    
por rlduffy 08.08.2017 / 22:56

1 resposta

0

Eu suspeito que o problema se resolveria desinstalando e reinstalando o GitLab, mas eu não estou preparado para fazer isso agora, então vou recorrer ao uso do http.

    
por 15.08.2017 / 00:23