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
  • #5812

Closed
Open
Created Dec 10, 2013 by Administrator@rootOwner

Cannot clone with ssh protocol

Created by: ignazioc

I have an issue like this https://github.com/gitlabhq/gitlabhq/issues/3686 or this https://github.com/gitlabhq/gitlabhq/issues/4274

I deleted my previous entries in authorized_keys and run this command:

bundle exec rake gitlab:shell:setup RAILS_ENV=production

now i have the right keys in authorized_keys file.

In trouble shooting is specified the right command that can be present inside this file

command="/home/git/gitlab/apps/gitlab/gitlab-shell/bin/gitlab-shell key-2",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty

but i use this command i receive a message "command not found" on connection, because the gitlab-shell isn't in this path anymore :)

the right command is

command="/home/git/gitlab-shell/bin/gitlab-shell key-2",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa #your key#

With this command i finally can clone my repos from HTTP, but when try with

git clone git@mydomain....
i receive this error:
Access denied.
fatal: Could not read from remote repository.

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

this is my infos

SSH

$ ssh -T git@syskorepo.######.prv
Welcome to GitLab, Anonymous!

INFO

System information
System:     Ubuntu 12.04
Current User:   git
Using RVM:  no
Ruby Version:   2.0.0p353
Gem Version:    2.0.14
Bundler Version:1.3.5
Rake Version:   10.1.0

GitLab information
Version:    6.3.0
Revision:   b56f85c
Directory:  /home/git/gitlab
DB Adapter: mysql2
URL:        http://syskorepo.###.prv:3000
HTTP Clone URL: http://syskorepo.###.prv:3000/some-project.git
SSH Clone URL:  git@syskorepo.###.prv:some-project.git
Using LDAP: no
Using Omniauth: no

GitLab Shell
Version:    1.7.9
Repositories:   /home/git/repositories/
Hooks:      /home/git/gitlab-shell/hooks/
Git:        /usr/local/bin/git
Assignee
Assign to
Time tracking