2017-09-20 1 views
0

내가 고정 표시기의 용기에 gitlab 9.5.5을 실행하고있어 나는 다음과 같은 오류 얻을 HTTP를 통해 새 저장소에서 최초의 푸시를 할 때 :Gitlab의 API에 액세스 할 수 없습니다

* upload completely sent off: 387 out of 387 bytes 
< HTTP/1.1 200 OK 
< Server: nginx 
< Date: Wed, 20 Sep 2017 13:17:43 GMT 
< Content-Type: application/x-git-receive-pack-result 
< Content-Length: 118 
< Connection: keep-alive 
< Cache-Control: no-cache 
< X-XSS-Protection: 1; mode=block 
< X-Frame-Options: SAMEORIGIN 
< X-Content-Type-Options: nosniff 
< 
* Connection #1 to host localhost left intact 
remote: GitLab: API is not accessible 
To http://localhost/root/project01.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'http://localhost/root/project01.git' 

컨테이너 :

에게
IMAGE     PORTS      NAMES 
images/gitlab-nginx  0.0.0.0:80->80/tcp  test_nginx_1 
images/gitlab:9.5  test_sidekiq_1 
images/gitlab:9.5  0.0.0.0:22->22/tcp  test_sshd_1 
images/gitlab:9.5  8181/tcp     test_workhorse_1 
images/gitlab:9.5  8080/tcp     test_gitlab_1 
images/gitlab:9.5  9999/tcp     test_gitaly_1 
images/postgres:9.6  5432/tcp     test_postgres_1 
images/redis    6379/tcp     test_redis_1 

컨테이너 로그 :

gitaly_1  | {"args":["/usr/bin/git","receive-pack","--stateless-rpc","--advertise-refs","/mnt/data/repositories/root/project01.git"],"grpc.method":"InfoRefsReceivePack","grpc.request.repoPath":"root/project01.git","grpc.request.repoStorage":"default","grpc.request.topLevelGroup":"root","grpc.service":"gitaly.SmartHTTP","level":"info","msg":"spawn","path":"/usr/bin/git","peer.address":{"IP":"172.18.0.6","Port":34318,"Zone":""},"span.kind":"server","system":"grpc","time":"2017-09-20T13:22:54Z"} 
gitaly_1  | {"args":["/usr/bin/git","receive-pack","--stateless-rpc","--advertise-refs","/mnt/data/repositories/root/project01.git"],"command.exitCode":0,"command.inblock":0,"command.maxrss":5872,"command.oublock":0,"command.real_time_ms":3.1934519999999997,"command.system_time_ms":0,"command.user_time_ms":0,"grpc.method":"InfoRefsReceivePack","grpc.request.repoPath":"root/project01.git","grpc.request.repoStorage":"default","grpc.request.topLevelGroup":"root","grpc.service":"gitaly.SmartHTTP","level":"info","msg":"spawn complete","path":"/usr/bin/git","peer.address":{"IP":"172.18.0.6","Port":34318,"Zone":""},"span.kind":"server","system":"grpc","time":"2017-09-20T13:22:54Z"} 
gitaly_1  | {"grpc.code":"OK","grpc.method":"InfoRefsReceivePack","grpc.request.repoPath":"root/project01.git","grpc.request.repoStorage":"default","grpc.request.topLevelGroup":"root","grpc.service":"gitaly.SmartHTTP","grpc.time_ms":3,"level":"info","msg":"finished streaming call","peer.address":{"IP":"172.18.0.6","Port":34318,"Zone":""},"span.kind":"server","system":"grpc","time":"2017-09-20T13:22:54Z"} 
workhorse_1 | localhost 172.18.0.9:43596 - - "GET /root/project01.git/info/refs?service=git-receive-pack HTTP/1.1" 200 180 "" "git/2.11.0 (Apple Git-81)" 0.152725 
nginx_1  | 172.18.0.1 - root "GET /root/project01.git/info/refs?service=git-receive-pack HTTP/1.1" 200 180 "-" "git/2.11.0 (Apple Git-81)" 
gitlab_1  | INFO -- : Started POST "/root/project01.git/git-receive-pack" for 172.18.0.6 at 2017-09-20 13:22:54 +0000 
gitlab_1  | INFO -- : Processing by Projects::GitHttpController#git_receive_pack as application/x-git-receive-pack-result 
gitlab_1  | INFO -- : Parameters: {"namespace_id"=>"root", "project_id"=>"project01.git"} 
gitlab_1  | INFO -- : Completed 200 OK in 170ms (Views: 1.4ms | ActiveRecord: 11.3ms) 
gitlab_1  | INFO -- : Started POST "/api/v4/internal/allowed" for 172.18.0.6 at 2017-09-20 13:22:55 +0000 
workhorse_1 | localhost 172.18.0.9:43606 - - [2017-09-20 13:22:54.793530983 +0000 UTC] "POST /root/project01.git/git-receive-pack HTTP/1.1" 200 113 "" "git/2.11.0 (Apple Git-81)" 0.502495 
nginx_1  | 172.18.0.1 - root [20/Sep/2017:13:22:55 +0000] "POST /root/project01.git/git-receive-pack HTTP/1.1" 200 113 "-" "git/2.11.0 (Apple Git-81)" 

나는 production.rb 아무것도하지만 유용한 일을 통해 gitlab 디버그 로그를 사용 가능 DB 요청 만. 마스터 브랜치는 보호되지 않습니다.

production: &base 
    gitlab: 
    host: localhost 
: gitlab.yml 내부 gitlab-shell.yml

gitlab_url: "http://gitlab:8080" 

내부

:

내가이 때문에 URL을 불일치로 발생할 수있는 몇 가지 정보를 발견, 나는 다음과 같은 사용

내가 마지막 한 ti gitlab 또는 0.0.0.0을 변경하려고했지만 도움이되지 않았습니다.

이 오류는 gitlab-shell에서 비롯된 것으로 보이지만 로그에는 아무것도 표시되지 않습니다.

답변

0

current gitlab architecture scheme을 기반으로 예상하지 못한 작업 주체 컨테이너 트리거 gitlab shell을 보여줍니다. gitlab shell secret을 workhorse 컨테이너에 추가 한 후이 문제를 해결했습니다.

관련 문제