我正在使用gitlab来管理git连接。这是我的问题:
root@ubuntu:/tmp/test1/test1# git push -u origin master
Access denied.
fatal: The remote end hung up unexpectedly
我还检查了gitlab-shell.log,这里是内容:
W, [2015-01-13T16:47:13.252992 #26662] WARN -- : gitlab-shell: Access denied for git command <git-receive-pack 'Jianyong/test1.git'> by user with key key-8.
我的主机正在运行CentOS 6.6,这是我的gitlab环境:
System information
System: CentOS release 6.6 (Final)
Current User: root
Using RVM: no
Ruby Version: 2.0.0p353
Gem Version: 2.0.14
Bundler Version:1.7.12
Rake Version: 10.1.0
GitLab information
Version: 6.4.3
Revision: 3173626
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://gitlab.glodon-ci.com
HTTP Clone URL: http://gitlab.glodon-ci.com/some-project.git
SSH Clone URL: git@gitlab.glodon-ci.com:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.9.6
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
然后我也试过了:
ssh -T git@gitlab.glodon-ci.com
它记录了#欢迎使用Gitlab,管理员!&#39;
出了什么问题?
答案 0 :(得分:1)
几天后,我终于解决了。 注意gitlab的几个方面。这是:
/home/git/gitlab-shell/config.yml
gitlab_url = "http://youraddress:port"