チェンジセットをリモートリポジトリにプッシュしようとしていますが、コマンドが手渡しているように見えて何も起こりません。SSHプロトコルによるhgプッシュ失敗の診断方法
私はWindows 8.1上で、Mercurial(4.2)の最新バージョンを実行しています。私は鍵認証かパスワードベースのどちらを使っていても問題なくPuTTYとOpenSSHクライアントを使用して私のサーバーにSSH接続することができます。
マイhgrcファイルがこれを持っている:ここでは
[ui]
...
ssh = ssh -i "path_to_id_file" -2 -C
[defaults]
...
push = --debug
は、私は、コマンドラインに乗る出力されます。その後
pushing to ssh://[email protected]//var/hgrepos/projectx
running ssh -i "path_to_id_file" -2 -C [email protected] "hg -R /var/hgrepos/projectx serve --stdio"
sending hello command
sending between command
、何も分、起こりません。私は私の秘密鍵にパスフレーズを与えなければならないと思っていました。単にssh [email protected]
と入力したときと同じです。 Ctrl + Cは何もしません。ウィンドウを閉じる必要があります。
私はキー認証を使用しているのか、パスワード認証を使用しているのかにかかわらず、プッシュは常に「コマンド送信中」の直後に無期限にハングします。ある時点で、私は鍵のパスフレーズやパスワードが期待されていると思っていましたが、どちらかの入力は肯定的なものではありませんでした。
私はこのリモートサーバーを管理しており、HTTPSとMercurialを使用してこのリモートサーバーを長年にわたって管理しており、そのプロトコルを通じて期待どおりに動作します。私は徐々にキーベースの認証に移行しており、hgはこの道を歩む最後のステップです。
最後の情報:hg clone
は同じ動作を示します。
これを診断するのに役立つものは、非常に高く評価されます。私は、サーバー上のSSHログを有効にしていると/var/log/secure
tail'ingとき、私はこれを取得
EDIT(これらの行は、私が以前に与えた4行のものをサーバー側で一致している):
Jul 4 13:15:40 vpsxxxxx sshd[11654]: debug1: Forked child 15779.
Jul 4 13:15:40 vpsxxxxx sshd[15779]: Set /proc/self/oom_score_adj to 0
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: inetd sockets after dupping: 3, 3
Jul 4 13:15:40 vpsxxxxx sshd[15779]: Connection from 176.188.xx.xx port 64160
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: Client protocol version 2.0; client software version OpenSSH_7.5
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: match: OpenSSH_7.5 pat OpenSSH*
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: Enabling compatibility mode for protocol 2.0
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: Local version string SSH-2.0-OpenSSH_5.3
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: permanently_set_uid: 74/74
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: list_hostkey_types: ssh-rsa,ssh-dss
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: SSH2_MSG_KEXINIT sent
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: SSH2_MSG_KEXINIT received
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: kex: client->server aes128-ctr [email protected] [email protected]
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: kex: server->client aes128-ctr [email protected] [email protected]
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: SSH2_MSG_NEWKEYS sent
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: expecting SSH2_MSG_NEWKEYS
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: SSH2_MSG_NEWKEYS received
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: KEX done
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: userauth-request for user userx service ssh-connection method none
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: attempt 0 failures 0
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: PAM: initializing for "userx"
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: PAM: setting PAM_RHOST to "176.188.xx.xx"
Jul 4 13:15:40 vpsxxxxx sshd[15779]: debug1: PAM: setting PAM_TTY to "ssh"
Jul 4 13:15:40 vpsxxxxx sshd[15780]: debug1: userauth_send_banner: sent
これを間違った方法で解釈していない限り、クライアント側のMercurialは、まだ開かれていない通信回線でコマンドを送信している間に、ユーザーがまだ認証されていないようです認証された。
'-vvv'スイッチを' ssh'に追加します。 – Jakuje
'-vvv'は' hg push 'とは何の効果もありませんでしたが、hgが実行するコマンドの手動実行に影響しました。 – AbVog