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

Closed
Open
Created May 05, 2014 by Administrator@rootOwner

gitlab can not use ssh to clone project and can not push via http

Created by: poc7667

I always get the errors, when clone projects from server,

% git clone git@dqa-dev:root/yoyo.git
Cloning into 'yoyo'...
git@dqa-dev's password:
fatal: 'root/yoyo.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.

I followed by https://github.com/gitlabhq/gitlabhq/blob/6-4-stable/doc/install/installation.md followed by each step.

ssh [email protected] it works well.

execute the command

echo "PermitUserEnvironment yes" >> /etc/ssh/sshd_config

I can clone via HTTP but can not push back, sucks gitlab =_=" It will be pending here.

Username for 'http://dqa-dev:1987': poc
Password for 'http://poc@dqa-dev:1987':
Counting objects: 3, done.
Writing objects: 100% (3/3), 192 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)

remote: /usr/local/lib/ruby/2.0.0/net/protocol.rb:158:in `rescue in rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)
remote:     from /usr/local/lib/ruby/2.0.0/net/protocol.rb:152:in `rbuf_fill'
remote:     from /usr/local/lib/ruby/2.0.0/net/protocol.rb:134:in `readuntil'
remote:     from /usr/local/lib/ruby/2.0.0/net/protocol.rb:144:in `readline'
remote:     from /usr/local/lib/ruby/2.0.0/net/http/response.rb:39:in `read_status_line'
remote:     from /usr/local/lib/ruby/2.0.0/net/http/response.rb:28:in `read_new'
remote:     from /usr/local/lib/ruby/2.0.0/net/http.rb:1406:in `block in transport_request'
remote:     from /usr/local/lib/ruby/2.0.0/net/http.rb:1403:in `catch'
remote:     from /usr/local/lib/ruby/2.0.0/net/http.rb:1403:in `transport_request'
remote:     from /usr/local/lib/ruby/2.0.0/net/http.rb:1376:in `request'
remote:     from /home/git/gitlab-shell/lib/gitlab_net.rb:76:in `block in get'
remote:     from /usr/local/lib/ruby/2.0.0/net/http.rb:852:in `start'
remote:     from /home/git/gitlab-shell/lib/gitlab_net.rb:76:in `get'
remote:     from /home/git/gitlab-shell/lib/gitlab_net.rb:31:in `allowed?'
remote:     from /home/git/gitlab-shell/lib/gitlab_update.rb:39:in `exec'
remote:     from hooks/update:13:in `<main>'
remote: error: hook declined to update refs/heads/master
To http://dqa-dev:1987/poc/lala3.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'http://dqa-dev:1987/poc/lala3.git'

Here's the permission of my home folder

drwx--x--x 12 git  git   4096 May  5 17:23 ./
drwxr-xr-x  4 root root  4096 Apr 30 15:21 ../
-rw-------  1 git  git  26150 May  5 17:27 .bash_history
-rw-r--r--  1 git  git    220 Apr 30 15:21 .bash_logout
-rw-r--r--  1 git  git   3617 May  5 10:57 .bashrc
drwxrwxr-x  2 git  git   4096 Apr 30 16:28 bin/
drwx------  2 git  git   4096 May  5 15:58 .cache/
drwxr-xr-x  4 git  git   4096 Apr 30 15:36 .gem/
-rw-r--r--  1 git  git   1435 May  5 16:42 .gitconfig
drwxr-xr-x 17 git  git   4096 May  5 16:26 gitlab/
drwxr-x---  2 git  git   4096 May  5 14:33 gitlab-satellites/
drwxr-xr-x  8 git  git   4096 May  5 16:44 gitlab-shell/
-rw-rw-r--  1 git  git    362 May  5 14:30 gitlabshell.sh
-rw-r--r--  1 git  git    675 Apr 30 15:21 .profile
-rw-rw-r--  1 git  git     52 Apr 30 17:55 .pry_history
-rw-------  1 git  git     42 May  5 13:13 .psql_history
-rw-rw-r--  1 git  git      9 May  5 15:16 .rediscli_history
drwxrws---  5 git  git   4096 May  5 15:54 repositories/
-rw-rw-r--  1 git  git   1593 May  5 10:04 setting_gitlab.sh
drwx------  2 git  git   4096 May  5 17:23 .ssh/
drwxrwxr-x  3 git  git   4096 May  5 15:17 .vegas/
drwxr-xr-x  2 git  git   4096 May  5 11:32 .vim/
-rw-------  1 git  git   8442 May  5 17:23 .viminfo

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8
Checking Environment ...

Git configured for git user? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.9.3 ? ... OK (1.9.3)
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
Satellites access is drwxr-x---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ... can't check, you have no projects
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 redis-cli executable: redis-cli 2.2.12
Send ping to redis 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
Database contains orphaned UsersGroups? ... no
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? ... yes
projects have namespace: ... can't check, you have no projects
Projects have satellites? ... can't check, you have no projects
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/local/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.5)

Checking GitLab ... Finished
Assignee
Assign to
Time tracking