Не удается клонировать git, pu sh, тянуть с s sh, вызвать ошибку kex_exchange_identification - PullRequest
0 голосов
/ 08 апреля 2020

В macOS Catalina, когда я пу sh мой локальный репо

> git push origin master
kex_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

И я пытаюсь s sh до git@github.com также, он возвращает

> ssh -Tv git@github.com
OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/user/.ssh/config
debug1: /Users/user/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to github.com port 22.
debug1: Connection established.
debug1: identity file /Users/user/.ssh/id_rsa type 0
debug1: identity file /Users/user/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
kex_exchange_identification: Connection closed by remote host

мой файл конфигурации

Host *                                                                                                                                                                                                  
    AddKeysToAgent yes 
    UseKeychain yes 
    IdentityFile ~/.ssh/id_rsa
    ForwardX11 yes 
Host 23
    HostName 10.214.130.23
    User ****
Host 26
    HostName 10.214.130.26
    User ****
Host 27
    HostName 10.214.130.27
    User ****
Host desktop
    HostName 10.214.130.251
    User ****

В начале я думаю, что id_rsa может быть неправильным, поэтому я использую тот же ключ ~/.ssh/id_rsa на другом сервере Linux, он работает правильно.

> ssh -T git@github.com
Hi weleen! You've successfully authenticated, but GitHub does not provide shell access.

Я нахожу некоторые похожие вопросы, но они не решены.

...