如何解决“GitLab:API 不可访问"推送到新存储库时? [英] How to resolve "GitLab: API is not accessible" when pushing to a new repository?

查看:10
本文介绍了如何解决“GitLab:API 不可访问"推送到新存储库时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在我的工作地点(目前在 v7.12.00-ee ceb5083)有一个本地托管的 GitLab 企业版.我可以通过 GUI 毫无问题地创建存储库.但是当我尝试向存储库添加任何内容时,我收到了这个错误:

we have a locally-hosted Enterprise Edition of GitLab at my place of employment (currently at v7.12.00-ee ceb5083). I can create a repository through the GUI without issue. But when I try to add anything to the repository, I get this error:

D:ws	esting [master]> git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 219 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: API is not accessible
To http://gitlab.ops.cld/duffrw/testing.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://gitlab.ops.cld/duffrw/testing.git'

我在 /var/log/gitlab/gitlab-shell/gitlab-shell.log 文件中看到 API 没有响应,并给出内部服务器错误":

I see in the /var/log/gitlab/gitlab-shell/gitlab-shell.log file that the API isn't responding, and is giving an "Internal Server Error":

E, [2015-07-22T16:05:51.812454 #15110] ERROR -- : API call <POST http://127.0.0.1:8080/api/v3/internal/allowed> failed: 500 => <{"message":"500 Internal Server Error"}>.

几个问题...我可以从这里去哪里?一定有某种服务提供者没有运行.为什么不?它叫什么?我该如何启动它?

我检查了 /var/log/gitlab/nginx/gitlab_access.log 并找到了这些行,但我没有看到任何有趣的东西:

I checked in /var/log/gitlab/nginx/gitlab_access.log and found these lines, but I didn't see anything interesting:

172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - - [22/Jul/2015:16:05:50 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 401 0 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "GET /duffrw/testing.git/info/refs?service=git-receive-pack HTTP/1.1" 200 179 "-" "git/1.9.5.msysgit.1"
172.31.201.164 - duffrw [22/Jul/2015:16:05:51 +0000] "POST /duffrw/testing.git/git-receive-pack HTTP/1.1" 200 124 "-" "git/1.9.5.msysgit.1"

/var/log/gitlab/nginx/gitlab_error.log/var/log/gitlab/nginx/error 中的这个仓库的推送没有任何错误.日志完全是空的.

我错过了什么?

更新:

使用 gitlab-ctl tail 命令非常方便!它显示了一个堆栈跟踪,我将其发送到 GitLab,他们告诉我这是 7.12.00 中的一个错误.它已在 7.13.00 中修复.

Using the gitlab-ctl tail command is very handy! It revealed a stack trace, which I sent to GitLab and they told me that this was a bug in 7.12.00. It is fixed in 7.13.00.

推荐答案

如果使用 gitlab.com,服务器要么是正在更新或遇到问题.

If using gitlab.com, the server is either being updated or having issues.

您可以查看 https://status.gitlab.com 了解 GitLab 团队的更新.

You can check https://status.gitlab.com for updates from the GitLab team.

您还可以关注一个 Twitter 帐户:https://twitter.com/gitlabstatus

There's also a Twitter account you can follow: https://twitter.com/gitlabstatus

这篇关于如何解决“GitLab:API 不可访问"推送到新存储库时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆