Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #6266

Closed
Open
Created Feb 07, 2014 by Administrator@rootOwner

gitlab-shell is not invoked when I `ssh` to my server.

Created by: trusktr

So I'm wondering why I'm getting the common "fatal: Could not read from remote repository." error, and I've discovered that it's because the gitlab-shell isn't being invoked when I try ssh or git commands.

I'm fairly certain that this is the case for a couple reasons.

  1. I've put the line
puts "hello"

at the top of gitlab-shell and I don't see any "hello" message when I try git or ssh commands.

  1. I've checked /var/log/auth.log and it shows that I have successfully connected via ssh, then the connection immediately gets closed:
Feb  6 21:01:10 localhost sshd[9129]: Accepted publickey for git from 130.86.73.97 port 62704 ssh2: RSA xx:xx:xx:xx:xx:xx
Feb  6 21:01:10 localhost sshd[9129]: pam_unix(sshd:session): session opened for user git by (uid=0)
Feb  6 21:01:10 localhost systemd: pam_unix(systemd-user:session): session opened for user git by (uid=0)
Feb  6 21:01:10 localhost systemd-logind[2230]: New session 3515 of user git.
Feb  6 21:01:10 localhost sshd[9129]: pam_unix(sshd:session): session closed for user git
Feb  6 21:01:10 localhost systemd-logind[2230]: Removed session 3515.

So, as you can see, gitlab-shell is not being executed. I've installed GitLab before, so I'm familiar with setting all the permissions and ownership. The git user has full permissions to all the necessary files.

Running bin/check as the git user (after logging in with su - git -s /bin/bash) shows that everything is OK and should be working just fine.

I have not modified .ssh/authorized keys manually. It was all done through the GitLab web interface, and it looks like this (the RSA key shortened for simplicity):

command="/usr/share/gitlab-shell/bin/gitlab-shell key-6",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3Nxxx68Q== Joe@LENOVO-PC

Any idea why gitlab-shell doesn't seem to get executed, and thus I cannot use ssh?

Assignee
Assign to
Time tracking