github 上的 SSH 项目出现问题
SSH project on github giving issues
我 运行 完成了向 Github 添加密钥的整个过程,并在 Github 提供的 guide 上完成了所有操作,但之后,它每 5 ssh 密码的最小值,这在处理项目时非常烦人,所以我找到了一个可以简化它的命令,但今天早上我收到一条错误消息
C:\Windows\System32\OpenSSH\ssh.exe: C:WindowsSystem32OpenSSHssh.exe: command not found
重新运行检查是否一切正常
$ ssh -T git@github.com
它通过了身份验证,但错误并没有消失,所以我 运行 我在星期五收到的命令相同 git config --global --add core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
现在,当我执行 'refresh'(推拉)以获取对我的存储库的最新更改时,它只是继续同步更改,就好像它是无限循环然后超时。
编辑***
如果我 运行 git 拉入 git bash 我得到以下输出
$ git pull
CreateProcessW failed error:193
ssh_askpass: posix_spawnp: Unknown error
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
但在那之前,我运行ssh -T git@github.com
输入密码后得到如下输出
Hi Faziki! You've successfully authenticated, but GitHub does not provide shell access.
有谁知道我可以做些什么来解决这个问题?
我们的想法是 不 使用 Windows 本身的任何东西,而只使用你的 Git for Windows (确保获得最新的 2.33.0.2)
因此请从您的全局 Git 配置中删除任何 ssh 设置,并确保您的 %PATH%
包括:
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%GH%\mingw64\libexec\git-core;%PATH%
CMD 中的 where ssh
应该给你:C:\path\to\git\usr\bin\ssh.exe
.
从那里,从同一个 CMD,您可以键入“bash”以切换到 bash shelll 会话。
确保 your ~/.bashrc
automatically launch the ssh agent.
add your private key to the agent:这将缓存密钥。
我 运行 完成了向 Github 添加密钥的整个过程,并在 Github 提供的 guide 上完成了所有操作,但之后,它每 5 ssh 密码的最小值,这在处理项目时非常烦人,所以我找到了一个可以简化它的命令,但今天早上我收到一条错误消息
C:\Windows\System32\OpenSSH\ssh.exe: C:WindowsSystem32OpenSSHssh.exe: command not found
重新运行检查是否一切正常
$ ssh -T git@github.com
它通过了身份验证,但错误并没有消失,所以我 运行 我在星期五收到的命令相同 git config --global --add core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
现在,当我执行 'refresh'(推拉)以获取对我的存储库的最新更改时,它只是继续同步更改,就好像它是无限循环然后超时。
编辑***
如果我 运行 git 拉入 git bash 我得到以下输出
$ git pull
CreateProcessW failed error:193
ssh_askpass: posix_spawnp: Unknown error
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
但在那之前,我运行ssh -T git@github.com
输入密码后得到如下输出
Hi Faziki! You've successfully authenticated, but GitHub does not provide shell access.
有谁知道我可以做些什么来解决这个问题?
我们的想法是 不 使用 Windows 本身的任何东西,而只使用你的 Git for Windows (确保获得最新的 2.33.0.2)
因此请从您的全局 Git 配置中删除任何 ssh 设置,并确保您的 %PATH%
包括:
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%GH%\mingw64\libexec\git-core;%PATH%
CMD 中的 where ssh
应该给你:C:\path\to\git\usr\bin\ssh.exe
.
从那里,从同一个 CMD,您可以键入“bash”以切换到 bash shelll 会话。
确保 your ~/.bashrc
automatically launch the ssh agent.
add your private key to the agent:这将缓存密钥。