1

我正在尝试使用 Cygwin 的 git,但这是我看到的:

$ git clone ssh://git-repo/some/repository
Cloning into 'repository'...
ssh: git-repo-actual-host-name.com: no address associated with name
fatal: Could not read from remote repository.

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

该消息显然是错误的,因为:

$ echo "$HOME"
/home/wvxvw
$ cat $HOME/.ssh/config
Host git-repo
 HostName git-repo-actual-host-name.com
 User wvxvw
 IdentityFile ~/.ssh/id_rsa
$ ls $HOME/.ssh
config  id_rsa  id_rsa.pub  known_hosts

任何想法出了什么问题/如何帮助它?

编辑

相同的信息,但较少“混淆”:

~/.ssh/config

Host tlv-git
 HostName tlv-git.host.com
 User WINDOMAIN\\wvxvw
 IdentityFile ~/.ssh/id_rsa

$ ssh tlv-git
ssh: Could not resolve hostname tlv-git: hostname nor servname provided, or not known

$ ssh tlv-git.host.com
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).

如果我尝试克隆一些存储库,就会发生这种情况:

$ git clone ssh://tlv-git/repo
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).

但是我已经ssh-agent安装了,所以如果我这样做:

$ eval $( ssh-agent )
$ ssh-add
$ git clone ssh://tlv-git/repo
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).

但是如果我提供用户名,那么它就可以工作......

$ git clone ssh://WINDOMAIN\\wvxvw@tlv-git/repo
4

1 回答 1

0

该 URL 应该是git-repo:/some/repository,并且 ~/.ssh/config 的用户通常是一个专用于 gitosis 安装的用户(git,不是wvxvw

这些天(2018 年,5 年后),如果需要重复相同的设置,它将使用:

于 2018-07-14T07:01:51.960 回答