简体   繁体   中英

Why doesn't git clone work with bitvise tunnelier on windows?

I am trying to clone a repo to my laptop from my main PC. Both systems use windows 7 (I know, go to linux). They also both have the latest msysgit running.

On the PC I have bitvise server for SSH, and have the client version running on the laptop. Git is setup as an env path in windows, and I can log into the PC from the laptop via SSH (keys have been shared, homepath set etc.)

When I type the following into msysgit on the laptop, I get an error:

git clone username@192.168.1.5:XABC
fatal: ''XABC'' does not appear to be a git repository

now if I type ssh username@192.168.1.5 ls XABC/.git I get the expected

COMMIT_EDITMSG
FETCH_HEAD 
HEAD 
etc.

What am I doing wrong?

Try cloning the remote repository with this command:

git.exe clone -v "ssh://user@XXX.XXX.XX.XX:YY/path/to/git/repo/repo.git" "C:\path\to\desired\clone"

Where XXX.XXX.XX.XX is the remote IP address and YY is the port, usually 22 for ssh service.

Haven't tried it but it should work. Also, check this answer and this blog post .

Hope it helps!

I used this combination long time ago.

Try using absolute dir and MSDOS(yes! C:\\\\FOO\\\\BAR) dir syntax with BitVise sshd, which does not include a unix-style dir hosting, unlike Cygwin.

I suspect this is a dir presenting issue. So I suggest using pscp.exe from putty, do a successful scp on your .git file and use the url you had luck on.

Anyway git don't care about storage and network, you can clone via windows share, ftp, another dir, and even Dropbox dir...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM