Можно отправить по SSH через Git Bash, но нельзя на Github Desktop

https://github.com/desktop/desktop/issues/11840

Версия и ОС

Выиграть 10 21H1 Github Рабочий стол 2.6.6

Шаги для воспроизведения поведения

На Git Bash:

19000@FIRESTAR MINGW64 /d/My-LaTeX-Files (master)
$ git remote -v
origin  [email protected]:1900011604/My-LaTeX-Files.git (fetch)
origin  [email protected]:1900011604/My-LaTeX-Files.git (push)

19000@FIRESTAR MINGW64 /d/My-LaTeX-Files (master)
$ git push
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 8 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 686 bytes | 343.00 KiB/s, done.
Total 8 (delta 6), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (6/6), completed with 3 local objects.
To github.com:1900011604/My-LaTeX-Files.git
   1f5ff72..192e0af  master -> master

На рабочем столе Github

Нажмите «Отправить источник».

Если вы используете аутентификацию SSH, убедитесь, что ваш ключ добавлен в ssh-agent и связан с вашей учетной записью.

Ниже приведены результаты Git Bash:

19000@FIRESTAR MINGW64 /d/My-LaTeX-Files (master)
$ ssh-add ~/.ssh/id_rsa
Enter passphrase for /c/Users/19000/.ssh/id_rsa:
Identity added: /c/Users/19000/.ssh/id_rsa (/c/Users/19000/.ssh/id_rsa)

19000@FIRESTAR MINGW64 /d/My-LaTeX-Files (master)
$ ssh-add -l -E sha256
2048 SHA256:(**deleted due to safety reasons**) /c/Users/19000/.ssh/id_rsa (RSA)

19000@FIRESTAR MINGW64 /d/My-LaTeX-Files (master)
$ ssh -vT [email protected]
OpenSSH_8.5p1, OpenSSL 1.1.1j  16 Feb 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [140.82.113.4] port 22.
debug1: Connection established.
debug1: identity file /c/Users/19000/.ssh/id_rsa type 0
debug1: identity file /c/Users/19000/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/19000/.ssh/id_dsa type -1
debug1: identity file /c/Users/19000/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/19000/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/19000/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/19000/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/19000/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/19000/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/19000/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/19000/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/19000/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/19000/.ssh/id_xmss type -1
debug1: identity file /c/Users/19000/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.5
debug1: Remote protocol version 2.0, remote software version babeld-c2015ddc
debug1: compat_banner: no match: babeld-c2015ddc
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen /c/Users/19000/.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: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] 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:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: load_hostkeys: fopen /c/Users/19000/.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 'github.com' is known and matches the RSA host key.
debug1: Found key in /c/Users/19000/.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/19000/.ssh/id_rsa RSA SHA256:(**deleted due to safety reasons**) agent
debug1: Will attempt key: /c/Users/19000/.ssh/id_dsa
debug1: Will attempt key: /c/Users/19000/.ssh/id_ecdsa
debug1: Will attempt key: /c/Users/19000/.ssh/id_ecdsa_sk
debug1: Will attempt key: /c/Users/19000/.ssh/id_ed25519
debug1: Will attempt key: /c/Users/19000/.ssh/id_ed25519_sk
debug1: Will attempt key: /c/Users/19000/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /c/Users/19000/.ssh/id_rsa RSA SHA256:(**deleted due to safety reasons**) agent
debug1: Server accepts key: /c/Users/19000/.ssh/id_rsa RSA SHA256:(**deleted due to safety reasons**) agent
debug1: Authentication succeeded (publickey).
Authenticated to github.com ([140.82.113.4]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: filesystem full
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi 1900011604! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2832, received 2612 bytes,
in 0.7 seconds
Bytes per second: sent 4077.5, received 3760.7
debug1: Exit status 1

person 1900011604    schedule 22.03.2021    source источник


Ответы (3)


Я подозреваю ваше сообщение. Если вы используете SSH-аутентификацию, убедитесь, что ваш ключ добавлен в ssh-agent и связан с вашей учетной записью. является частью следующего диалогового окна ошибки:

ошибка

Попробуйте еще раз добавить свой ключ ssh: ssh-add /path/to/key

Если нет, проверьте desktop/desktop выпуск 8860.

Проверьте журналы GitHub Desktop: Справка › Показать журналы в Finder (macOS) или проводнике (Windows).

Проверьте, достаточно ли выхода/возврата из GitHub Desktop.

person VonC    schedule 22.03.2021

Этот ответ https://stackoverflow.com/a/29380765/2849383 спас мне всю жизнь. Попробуйте следующее

$ eval "$(ssh-agent -s)"
$ ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
person Diaa    schedule 25.07.2021

Если у вас есть ключ SSH с парольной фразой, он не будет работать с GitHub Desktop. Воссоздайте новый ключ SSH без парольной фразы. Это буквально спасло мою жалкую жизнь.

person Jean-Baptiste Brasselet    schedule 27.07.2021