首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gitlab -> git推-u源文件母版->access被拒绝,致命:远程终端意外挂断。

gitlab -> git推-u源文件母版->access被拒绝,致命:远程终端意外挂断。
EN

Stack Overflow用户
提问于 2015-01-13 09:20:04
回答 1查看 1.3K关注 0票数 0

我正在使用gitlab来管理git连接。我的问题是:

代码语言:javascript
复制
root@ubuntu:/tmp/test1/test1# git push -u origin master
Access denied.
fatal: The remote end hung up unexpectedly

我还查看了gitlab-shell.log . also,这是内容:

代码语言:javascript
复制
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环境:

代码语言:javascript
复制
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

然后我也试着:

代码语言:javascript
复制
ssh -T git@gitlab.glodon-ci.com

它记录了“欢迎来到Gitlab,管理员!”

怎么了?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-14 06:12:01

几天后,我终于解决了。注意gitlab的几个方面。以下是:

  1. 如果使用apache,则应该编辑/home/git/gitlab-shell/config.ymlgitlab_url = "http://youraddress:port"
  2. 如果使用使用selinux机制的centos或radhat os,则应将其从强制改为允许。
  3. 通过使用用户名和电子邮件,确保您已将公钥粘贴到gitlab。
  4. 确保你的gitlab,gitlab,redis服务运行良好。如果这些方法不能很好地工作,您应该阅读日志文件以获得一些有用的信息。
  5. 然后,如果您编辑了一些配置文件,则应该重新启动服务。别忘了。
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27918599

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档