2017-11-02 8 views
0

우리는 Gerrit를 설치하여 서버에서 저장소를 관리합니다. 지금까지 모든 것이 잘 작동하고 ssh를 사용하여 복제 할 수 있습니다.http를 apache2 뒤에 사용하는 Gerrit 복제본

Gerrit는 버전 2.14.2 아파치 2.4.18입니다.

/media/data/gerrit/etc/gerrit.config

[gerrit] 
    basePath = git 
    serverId = ed5a7ef7-289e-4590-9292-cbdede1b0dc9 
    canonicalWebUrl = http://repository.something.com/gerrit 
[database] 
    type = h2 
    database = /media/data/gerrit/db/ReviewDB 
[index] 
    type = LUCENE 
[auth] 
    type = HTTP 
    logoutUrl = http://[email protected]/gerrit 
[receive] 
    enableSignedPush = false 
[sendemail] 
    smtpServer = mail.something.com 
    from = Code Review <[email protected]> 
[container] 
    javaHome = /usr/lib/jvm/java-8-openjdk-amd64/jre 
    user = administrator 
[sshd] 
    listenAddress = *:29418 
[httpd] 
    listenUrl = proxy-http://127.0.0.1:8081/gerrit 
[cache] 
    directory = cache 
[plugins] 
    allowRemoteAdmin = true 
[download] 
    command = checkout 
    command = cherry_pick 
    command = pull 
    scheme = ssh 
    scheme = http 
[commitmessage] 
    maxSubjectLength = 80 
    maxLineLength = 100 
    longLinesThreshold = 10 
    rejectTooLong = false 
[plugin "emoticons"] 
    showEmoticons = true 
[reviewers] 
    enableREST = true 
    enableUI = true 
    ignoreDrafts = true 
    autoAddReviewers = false 
    maxReviewers = 1 
    enableLoadBalancing = false 
    plusTwoRequired = true 
    plusTwoAge = 8 
    plusTwoLimit = 10 
[gitweb] 
    type = custom 
    linkname = log 
    url = http://repository.something.com/cgit 
    project = /${project}.git 
    branch = /${project}.git/log 
    revision = /${project}.git/commit/?id=${commit} 
    filehistory = /${project}.git/log 
[lfs] 
    plugin = lfs 

/etc/apache2/mods-enable/gerrit.conf : (필요한 경우 검열) 우리의 구성 파일입니다

ProxyPassMatch /([[:alnum:]-]+)\.git(.*) http://localhost:8081/gerrit/a/$1.git$2 
ProxyPass   /gerrit http://localhost:8081/gerrit nocanon 
ProxyPassReverse /gerrit http://localhost:8081/gerrit nocanon 
ProxyRequests  Off 

<Proxy http://localhost:8081/gerrit> 
    Order deny,allow 
    Allow from all 
</Proxy> 

<Location /gerrit> 
    AuthType Digest 
    AuthName "gerrit" 
    AuthUserFile /etc/apache2/.htdigest 
    Require valid-user 
</Location> 

내가 말했듯이 ssh를 사용한 복제는 잘 작동합니다. 하지만 http를 사용하여 복제하려고하면 인증 오류가 발생합니다. 다른 설정을 사용하여 mods가 활성화 된 사이트와 사용 가능한 사이트에서 별도의 설정 파일을 사용하여 많은 시도를했습니다.

어떤 생각이 잘못되었을 수 있습니까?

이미 보았 듯이 repository.someting.com에 방문 페이지가 있으며 repository.something.com/gerrit를 사용하여 Gerrit에 액세스합니다.

이 모든 아파치 구성 물건은 나에게 완전히 새로운 -.- 그래서 내가 자세한 내용은 디버깅하는 아파치 로그 레벨을 변경 ^^

답변

0

실제로 무엇을 아무 생각이 없습니다.

이러한 나의 시도했다 :

  1. 복제 글로벌 .gitconfig

    AH01781에서 수정없이 TortoiseGit을 사용 : 클라이언트 사용 잘못된 인증 방식 '기본'/ 리트/A/PluginTester/정보/심판 글로벌 .gitconfig

    AH01794에 수정없이 GitBash를 사용

  2. 클론 : 사용 hanswurst : P assword 불일치 :/리트/A/PluginTester/정보/심판

  3. 내가 http.proxyAuthMethod =이 .gitconfig에 소화 추가 TortoiseGit 다시 시도

    AH01781 : 클라이언트 사용 잘못된 인증 방식 '기본'/ 사용자 blubb : 패스워드 불일치 :/리트/A/PluginTester/정보/심판

  4. I 리트/A/PluginTester/정보/심판

  5. 그리고 힘내 배쉬에게 또한

    AH01794 시도 문서에서 사용자 이름이있는 프록시를 사용할 때만 작동한다는 것을 읽었습니다. 그래서 나는 http를 추가했다.proxy = http://[email protected]:80 그리고 Tortoisegit으로 다시 시도하십시오.

    AH02422 : HTTP Request Line; URI는 사용자 이름/암호를 포함 할 수 없습니다

  6. 및 GitBash

    AH02422 : HTTP 요청 라인; URI는 사용자 이름/암호를 포함 할 수 없습니다

  7. 문서가 프록시 사용자 이름, 나는 또한 TortoiseGit

    AH01781로 지금 http.proxy = http://repository.something.com:80에 프록시 시도를 포함해야합니다 말조차 : 클라이언트 사용 잘못된 인증 방식 '기본'/ 리트/A/PluginTester/정보/심판

  8. 그리고 GitBash

    • AH01626 : VALI 필요의 인증 결과 D-사용자 : 거부 (아직 인증 된 사용자)
    • AH01626 :의 승인 결과 :의 승인 결과 유효한 사용자 요구 : (아직 인증 된 사용자)이 거부
    • AH01626가
    • 부여를
    • AH01626 : 인증 결과 : 부여
    • AH01143 : 계획의 HTTP 처리기를 실행 (시도 0)
    • AH00942 : HTTP : 대한 연결을 인수했다 (로컬 호스트) localhost로 http://localhost:8081/gerrit/a/PluginTester/info/refs?service=git-upload-pack를 연결 : 8081 연결/리트/A/PluginTester/정보/심판 서비스 = git-upload-pack to localhost : 8081
    • ,210
    • AH00943 : HTTP를 : 대한 연결을 출시했습니다 (로컬 호스트) 다이제스트 더 이상 사용되지 않으므로

점 7, 내가 기대했던 것입니다. 그러나 8. 서버에서 그것은 나를 위해 좋아 보이지만 클라이언트가 여전히 "인증 실패"가져옵니다