Hi,
I worked really lot to be able to commit, but nothing helps. I have Windows. My gerrit user is binbot, the SSH key is set. git config --global gitreview.remote origin git config --global gitreview.username binbot Pageant is running, and the key is loaded. I never used it with git, it worked previously with SVN. I installed the latest git. I committed my change to local repository.
I followed all the steps on https://www.mediawiki.org/wiki/Gerrit/Tutorial including " #If_git_review_-R_fail"section. It says to set URL that begins with ssh like this: git remote set-url origin ssh:// binbot@gerrit.wikimedia.org:29418/pywikibot/core.git Is that correct?
c:\Pywikibot-dev\core>git status On branch stable Your branch is ahead of 'origin/stable' by 1 commit. (use "git push" to publish your local commits)
nothing to commit, working tree clean
Now I get two error messages, sometimes the first and sometimes the second:
c:\Pywikibot-dev\core>git review -R warning: auto-detection of host provider took too long (>2000ms) warning: see https://aka.ms/gcm/autodetect for more information. fatal: Egy feladat végrehajtása megszakadt. (This means one task broke.) bash: line 1: /dev/tty: No such device or address error: failed to execute prompt script (exit code 1) fatal: could not read Username for 'https://gerrit.wikimedia.org': No such file or directory
c:\Pywikibot-dev\core>git review -R warning: failed to probe 'https://gerrit.wikimedia.org/' to detect provider warning: An error occurred while sending the request. warning: see https://aka.ms/gcm/autodetect for more information. fatal: An error occurred while sending the request. fatal: A kĂ©relmet megszakĂtották: Nem sikerĂĽlt lĂ©trehozni az SSL/TLS biztonságos csatornát. (This means the request was broken, a safe SSH/TLS channel could not be established.) bash: line 1: /dev/tty: No such device or address error: failed to execute prompt script (exit code 1) fatal: could not read Username for 'https://gerrit.wikimedia.org': No such file or directory
I also read https://aka.ms/gcm/autodetectbut did not help what to do.
Can someone help me understand this mess?
Just for test I tried git push instead of review. It asked for my user name and password, and I got this (password is correct, I just logged in to gerrit in browser):
c:\Pywikibot-dev\core>git push warning: failed to probe 'https://gerrit.wikimedia.org/' to detect provider warning: An error occurred while sending the request. warning: see https://aka.ms/gcm/autodetect for more information. fatal: An error occurred while sending the request. fatal: A k├ęrelmet megszak├ştott├ík: Nem siker├╝lt l├ętrehozni az SSL/TLS biztons├ígos csatorn├ít. Username for 'https://gerrit.wikimedia.org': binbot Password for 'https://binbot@gerrit.wikimedia.org': warning: auto-detection of host provider took too long (>2000ms) warning: see https://aka.ms/gcm/autodetect for more information. remote: Unauthorized fatal: Authentication failed for ' https://gerrit.wikimedia.org/r/pywikibot/core.git/'
One clue. I tried to ssh from git bash window as written on https://www.mediawiki.org/wiki/Gerrit/Tutorial For some reasons, it is looking for my SSH key in obscure non-existing directories. I don't know where comes this idea from. Maybe pageant is useless? How can I set the pass to my key?
$ *ssh -p 29418 -v binbot@gerrit.wikimedia.org binbot@gerrit.wikimedia.org* OpenSSH_9.1p1, OpenSSL 1.1.1s 1 Nov 2022 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to gerrit.wikimedia.org [208.80.154.137] port 29418. debug1: Connection established. debug1: identity file /c/Users/\303\211n/.ssh/id_rsa type 0 debug1: identity file /c/Users/\303\211n/.ssh/id_rsa-cert type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_ecdsa type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_ecdsa-cert type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_ecdsa_sk type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_ed25519 type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_ed25519-cert type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_ed25519_sk type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_xmss type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_xmss-cert type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_dsa type -1 debug1: identity file /c/Users/\303\211n/.ssh/id_dsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_9.1 debug1: Remote protocol version 2.0, remote software version GerritCodeReview_3.5.4 (APACHE-SSHD-2.8.0) debug1: compat_banner: no match: GerritCodeReview_3.5.4 (APACHE-SSHD-2.8.0) debug1: Authenticating to gerrit.wikimedia.org:29418 as 'binbot' debug1: load_hostkeys: fopen /c/Users/\303\211n/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: rsa-sha2-512 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-rsa SHA256:j7HQoQ6fIuEgDHjONjI2CZ+2Iwxqgo2Ur5LbPqBgxOU debug1: load_hostkeys: fopen /c/Users/\303\211n/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host '[gerrit.wikimedia.org]:29418' is known and matches the RSA host key. debug1: Found key in /c/Users/\303\211n/.ssh/known_hosts:1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: Will attempt key: /c/Users/\303\211n/.ssh/id_rsa RSA SHA256:DfAqdC9y6xXr96g5JuTbf/Y7BXoojtoi8JHO/XAirvo debug1: Will attempt key: /c/Users/\303\211n/.ssh/id_ecdsa debug1: Will attempt key: /c/Users/\303\211n/.ssh/id_ecdsa_sk debug1: Will attempt key: /c/Users/\303\211n/.ssh/id_ed25519 debug1: Will attempt key: /c/Users/\303\211n/.ssh/id_ed25519_sk debug1: Will attempt key: /c/Users/\303\211n/.ssh/id_xmss debug1: Will attempt key: /c/Users/\303\211n/.ssh/id_dsa debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=< ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openssh.com, ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com, rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com ,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519, sk-ecdsa-sha2-nistp256@openssh.com,sk-ssh-ed25519@openssh.com ,rsa-sha2-512,rsa-sha2-256,ssh-rsa> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: /c/Users/\303\211n/.ssh/id_rsa RSA SHA256:DfAqdC9y6xXr96g5JuTbf/Y7BXoojtoi8JHO/XAirvo debug1: Authentications that can continue: publickey debug1: Trying private key: /c/Users/\303\211n/.ssh/id_ecdsa debug1: Trying private key: /c/Users/\303\211n/.ssh/id_ecdsa_sk debug1: Trying private key: /c/Users/\303\211n/.ssh/id_ed25519 debug1: Trying private key: /c/Users/\303\211n/.ssh/id_ed25519_sk debug1: Trying private key: /c/Users/\303\211n/.ssh/id_xmss debug1: Trying private key: /c/Users/\303\211n/.ssh/id_dsa debug1: No more authentication methods to try. binbot@gerrit.wikimedia.org: Permission denied (publickey).
Hi,
On 2/6/23 19:14, Bináris wrote:
Just for test I tried git push instead of review. It asked for my user name and password, and I got this (password is correct, I just logged in to gerrit in browser):
For pushing over HTTPS, it uses a different password than your login one. See https://gerrit.wikimedia.org/r/settings/#HTTPCredentials.
-- Kunal / Legoktm
Kunal Mehta legoktm@debian.org ezt írta (időpont: 2023. febr. 7., K, 2:03):
Hi,
For pushing over HTTPS, it uses a different password than your login one. See https://gerrit.wikimedia.org/r/settings/#HTTPCredentials.
Thank you, Kunal! That causes another error.
1. I told git remote set-url origin ssh:// binbot@gerrit.wikimedia.org:29418/pywikibot/core.git. Isn't that for pushing on ssh? If not, what is the solution? 2. I think " failed to probe 'https://gerrit.wikimedia.org/' to detect provider" is an independent error. What is our provider? 3. The generated password for pushing is OK, bit the commit was rejected, see below (that needs an extra permission, who is the admin?) 4. Even if I succed, pushing is not the recommended way, and git review -R does not work. 5. I don't understand in the below message, what does it do with stable, it should push to master, sholdn't it?
c:\Pywikibot-dev\core>git push warning: failed to probe 'https://gerrit.wikimedia.org/' to detect provider warning: An error occurred while sending the request. warning: see https://aka.ms/gcm/autodetect for more information. fatal: An error occurred while sending the request. fatal: A k├ęrelmet megszak├ştott├ík: Nem siker├╝lt l├ętrehozni az SSL/TLS biztons├ígos csatorn├ít. Username for 'https://gerrit.wikimedia.org': binbot Password for 'https://binbot@gerrit.wikimedia.org': warning: failed to probe 'https://gerrit.wikimedia.org/' to detect provider warning: An error occurred while sending the request. warning: see https://aka.ms/gcm/autodetect for more information. Enumerating objects: 40, done. Counting objects: 100% (40/40), done. Delta compression using up to 4 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 527 bytes | 7.00 KiB/s, done. Total 6 (delta 5), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (5/5) remote: error: branch refs/heads/stable: remote: Push to refs/for/stable to create a review, or get 'Push' rights to update the branch. remote: User: binbot remote: Contact an administrator to fix the permissions remote: Processing changes: refs: 1, done To https://gerrit.wikimedia.org/r/pywikibot/core.git ! [remote rejected] stable -> stable (prohibited by Gerrit: not permitted: update) error: failed to push some refs to ' https://gerrit.wikimedia.org/r/pywikibot/core.git' Enumerating objects: 40, done. Counting objects: 100% (40/40), done. Delta compression using up to 4 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 527 bytes | 35.00 KiB/s, done. Total 6 (delta 5), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (5/5) remote: error: branch refs/heads/stable: remote: Push to refs/for/stable to create a review, or get 'Push' rights to update the branch. remote: User: binbot remote: Contact an administrator to fix the permissions remote: Processing changes: refs: 1, done To ssh://gerrit.wikimedia.org:29418/pywikibot/core.git ! [remote rejected] stable -> stable (prohibited by Gerrit: not permitted: update) error: failed to push some refs to 'ssh:// gerrit.wikimedia.org:29418/pywikibot/core.git'
c:\Pywikibot-dev\core>