2017-03-02 55 views
0

我有推動從詹金斯服務器我改變格里特的服務器,因爲這個錯誤的問題:錯誤:未能推動一些裁判爲SSH沒有用戶名

+ git checkout origin/release_6.3.0 
Previous HEAD position was 6c1313da... Fixes getting secret posts when searching posts by market. 
HEAD is now at a9490de6... Fixes channels routes. 
+ git rev-parse Deploy_Stage_6.3.0_RC210_Her 
+ git tag Deploy_Stage_6.3.0_RC210_Her 
+ git push origin Deploy_Stage_6.3.0_RC210_Her 
debug1: Connecting to gerrit [XX.XX.XX.X] port 29418. 
debug1: Connection established. 
debug1: identity file /c/Users/mikz/.ssh/id_rsa type 1 
debug1: key_load_public: No such file or directory 
debug1: identity file /c/Users/mikz/.ssh/id_rsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /c/Users/mikz/.ssh/id_dsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /c/Users/mikz/.ssh/id_dsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /c/Users/mikz/.ssh/id_ecdsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /c/Users/mikz/.ssh/id_ecdsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /c/Users/mikz/.ssh/id_ed25519 type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /c/Users/mikz/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_7.3 
debug1: Remote protocol version 2.0, remote software version GerritCodeReview_2.12 (SSHD-CORE-0.14.0) 
debug1: no match: GerritCodeReview_2.12 (SSHD-CORE-0.14.0) 
debug1: Authenticating to gerrit:29418 as 'gerrit' 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: algorithm: diffie-hellman-group1-sha1 
debug1: kex: host key algorithm: ssh-rsa 
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none 
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none 
debug1: sending SSH2_MSG_KEXDH_INIT 
debug1: expecting SSH2_MSG_KEXDH_REPLY 
debug1: Server host key: ssh-rsa SHA256:lZ41xRL6gg58lbJKSIcYDlo54lUVj6lUFOCsj1zfKns 
debug1: Host '[gerrit]:29418' is known and matches the RSA host key. 
debug1: Found key in /c/Users/mikz/.ssh/known_hosts:1 
debug1: rekey after 4294967296 blocks 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: rekey after 4294967296 blocks 
debug1: SSH2_MSG_NEWKEYS received 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /c/Users/USER_NAME/.ssh/id_rsa 
debug1: Server accepts key: pkalg ssh-rsa blen 279 
debug1: Authentication succeeded (publickey). 
Authenticated to gerrit ([XX.XX.XX.X]:29418). 
debug1: channel 0: new [client-session] 
debug1: Entering interactive session. 
debug1: pledge: network 
debug1: Sending command: git-receive-pack 'PATH' 
remote: 
remote: Processing changes: refs: 1, done    
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 
debug1: channel 0: free: client-session, nchannels 1 
Transferred: sent 2904, received 252760 bytes, in 0.9 seconds 
Bytes per second: sent 3225.7, received 280757.7 
debug1: Exit status 0 
To ssh://gerrit:29418/PATH 
! [remote rejected] Deploy_Stage_6.3.0_RC210_Her -> Deploy_Stage_6.3.0_RC210_Her (prohibited by Gerrit) 
error: failed to push some refs to 'ssh://[email protected]:29418/PATH' 
Build step 'Conditional step (single)' marked build as failure 
Description set: 
Finished: FAILURE 

也許這是因爲在這一行:

要ssh://格里特:29418/PATH

我沒有用戶名,但我不知道如何解決它

我加入的.gitconfig以下行,但它不工作:
[URL 「SSH:// @格里特格里特:29418 /」]
與其使用SSH =://格里特:29418/



任何想法如何,我可以解決這個問題?

回答

0

當您執行「git push origin BRANCH」時,您會直接跳到分支,繞過Gerrit。此錯誤(Gerrit禁止)意味着「gerrit」用戶無權執行此操作。您需要授予用戶繞過代碼審查的權限,或者在您的push命令中使用「refs/for/BRANCH」。

在Gerrit文檔here中查看關於此錯誤的更多詳細信息。

+0

用戶「格瑞特」被設置在格里特 –

+0

管理員權限是不夠的一個格里特管理員。管理員可以分配「管理服務器」功能,但默認情況下它們不具有所有推送/創建權限。您需要確保「gerrit」用戶對「refs/heads/*」具有「推送」訪問權限。請檢查我發佈的鏈接中列出的所有其他權限。 –

+0

這裏是我的gerrit設置爲「refs/heads/*」的屏幕截圖 http://prntscr.com/efke62 用戶gerrit在管理員組 –

相關問題