8

在全新的 gitlab 安装(6.0.1)中推送到新的仓库失败并出现

Access denied.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

但是 ssh -vT git@www.my.gitlab.eu 有效。

4

3 回答 3

8

什么时候

sudo -u git -H /home/git/gitlab-shell/bin/check

我有:

Check GitLab API access: FAILED. code: 503

Check directories and files: 
    /home/git/repositories: OK
    /home/git/.ssh/authorized_keys: OK

在 gitlab-shell.log 我发现了一个 html 响应,上面写着:

错误

所请求的网址无法检索

尝试检索 URL 时遇到以下错误:http: //my.gitlab.eu//api/v3/internal/check

无法从主机名 my.gitlab.eu 确定 IP 地址

DNS 服务器返回:

名称错误:域名不存在。这意味着缓存无法解析 URL 中显示的主机名。检查地址是否正确。

您的缓存管理员是 admin@example.com。

我编辑了 gitlab-shell 的配置文件

/home/git/gitlab-shell# sudo -u git -H editor config.yml

像这样

# Url to gitlab instance. Used for api calls. Should end with a slash.
#gitlab_url: "http://my.gitlab.eu/"
gitlab_url: "http://123.xxx.xxx.xx"

尽管评论中有提示,但结尾斜杠明显导致 api 调用中的双斜杠。在我的情况下,dns 无法解决。所以现在我使用IP地址并且它可以工作。

于 2013-09-10T20:11:43.283 回答
0

关闭selinux。

setenforce 0

还要在 /etc/selinux/config 中将 SELINUX 设置为 permissive。

然后去投票这个答案:https ://stackoverflow.com/a/24212432/162070

于 2014-09-22T21:56:54.973 回答
0

检查您的帐户权限。只有所有者可以在 master 分支中提交。如果您的帐户是 Developer 类型,您需要创建新分支,并且所有者成员会将您的分支与 master 分支合并。

于 2015-09-11T11:39:05.593 回答