当从服务器克隆项目时,我总是得到错误
% 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.
我跟着https://github.com/gitlabhq/gitlabhq/blob/6-4-stable/doc/install/installation.md 然后是每一步。
ssh git@172.19.16.103
效果很好。
执行命令
echo "PermitUserEnvironment yes" >> /etc/ssh/sshd_config
我可以通过HTTP克隆但无法推回,糟透了gitlab = _ =“ 它将在这里等待。
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'
这是我的主文件夹的权限
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