我已经通过存储库安装了gitlab并将其配置为在apache服务器而不是nginx上运行(为了简单地管理一个Web服务器而不是两个)。
已正确安装和配置SSL证书。我可以通过HTTPS提取和推送没有问题。
此外,我能够通过SSH从项目中获取。 git用户正在进行身份验证,并被路由到正确的目录以提取repos。但是当我尝试推送时收到以下错误:
C:\Users\user\sshproject>git push -u origin master -v
Pushing to git@gitlab.domain.com:user/sshproject.git
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 258 bytes | 258.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: The project you were looking for could not be found.
To gitlab.domain.com:user/sshproject.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@gitlab.domain.com:user/sshproject.git'
我对这个错误的搜索几乎毫不含糊地指出我在原点上修改我的项目,或者仔细检查远程原点的目的地。我试图通过这些解决方案解决问题无济于事。
我在gitlab配置文件中包含了我已更改的设置列表。所有其他设置保持不变。希望比我聪明的人能指出我正确的方向。
external_url 'https://gitlab.domain.com'
gitlab_rails['trusted_proxies'] = [ '192.168.2.1/24', '192.168.2.1', '2001:0db8::/32' ]
git_data_dirs({
"default" => { "path" => "/path/repositories" },
"alternative" => { "path" => "/mnt/nfs-01/git-data" }
})
gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "127.0.0.1:8181"
user['home'] = "/path/repositories/repositories"
web_server['external_users'] = ['www-data']
nginx['enable'] = false