gpt4 book ai didi

linux - gitlab 8.2.0 git 不工作

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:26:34 25 4
gpt4 key购买 nike

我从源代码安装了 gitlab 8.2.0 并按照 https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation 上的说明进行操作.

当我用

运行检查时
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

我收到以下错误:

Running /home/git/gitlab-shell/bin/check
Check GitLab API access: FAILED. code: 301
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /home/git/gitlab-shell/config.yml
Please fix the error above and rerun the checks.

Checking GitLab Shell ... Finished

这是来自/home/git/gitlab-shell 的 config.yml 文件:

user: git
gitlab_url: "http://www.example.com/gitlab"
http_settings:
#ca_path: /etc/ssl/certs
self_signed_cert: true
repos_path: "/home/git/repositories/"
auth_file: "/home/git/.ssh/authorized_keys"
redis:
bin: "/usr/bin/redis-cli"
namespace: resque:gitlab
socket: "/var/run/redis/redis.sock"
log_level: INFO
audit_usernames: false

请注意,我正在使用相对 URL 功能在 www.example.com/gitlab 上运行 gitlab。此外,服务器位于反向代理之后,如果这与此问题有任何相关性,该代理会终止 https 到 http。

我也无法推送或 pull 任何存储库。当我尝试时出现以下错误:

git pull https://www.example.com/gitlab/test/testproject.git
Username for 'https://www.example.com': test
Password for 'https://test@www.example.com':
fatal: Couldn't find remote ref HEAD
Unexpected end of command stream

我也无法通过 webUI 将任何文件添加到任何项目。如果我尝试这样做,我会收到以下错误

Commit was rejected by pre-receive hook

production.log 中的日志如下所示:

Sarted POST "/gitlab/test/testprojekt/create/master" for 147.86.8.115 at             2015-11-26 15:24:43 +0100
Processing by Projects::BlobController#create as JSON
Parameters: {"new_branch"=>"master", "create_merge_request"=>"1", "commit_message"=>"test", "file"=># <ActionDispatch::Http::UploadedFile:0x007f776230faf8 @tempfile=# <Tempfile:/tmp/RackMultipart20151126-7584-308za1>, @original_filename="test2.txt", @content_type="text/plain", @headers="Content- Disposition: form-data; name=\"file\"; filename=\"test2.txt\"\r\nContent-Type: text/plain\r\n">, "namespace_id"=>"test", "project_id"=>"testprojekt", "id"=>"master"}
Completed 200 OK in 628ms (Views: 0.3ms | ActiveRecord: 3.3ms)
Started GET "/gitlab/test/testprojekt/new/master" for 147.86.8.115 at 2015-11-26 15:24:44 +0100
Processing by Projects::BlobController#new as HTML
Parameters: {"namespace_id"=>"test", "project_id"=>"testprojekt", "id"=>"master"}
Completed 200 OK in 85ms (Views: 49.6ms | ActiveRecord: 6.0ms)

最佳答案

我认为您可以尝试将 gitlab_url: "http://www.example.com/gitlab" 切换为 https -> gitlab_url: "https://www.example.com/gitlab”

不确定它是否是一个完整的修复,但它是一个建议。

编辑:config.yml 第 4 行应该看起来像

ca_path: "/etc/ssl/certs"

关于linux - gitlab 8.2.0 git 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33941353/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com