tags:

views:

173

answers:

3

Hello.

I'm confused.

I've installed copSSH and linked it with msysgit installation (by adding path to it). And now whenever I use copSSH tools (like ls, cd) I should use the absolute paths in form like '/home', /cygdrive/d/copSSH/home.

But when I used git I should use absolute paths in a different (another) form. like '/copSSH/home', 'd:/copSSH/home'.

For me it's really strange. Have anybody clue for that and an idea how to fix it?

Thanks a lot Andrei.

P.S. I use WinXP, git version 1.7.0.2.msysgit.0, copSSH 3.1.0. Everything is installed using http://www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/ article (with some modifications).

A: 

Please try this format

git clone gituser@sshserver:myapp.git
A: 

Didn't help. And I really wonder, how it can work. I think a port name should come after semicolon (:). I clone in the following way: git clone ssh://[email protected]:3636/work/git-bare/cathi_sim.git

One remark: d:/work/git-bare/cathi_sim.git -- is an actual path for the repo. I've tried to put repo in /home/gndrij/ folder (according to CopSSH/putty) and tried to clone using following links: 1) git clone ssh://[email protected]:3636/home/gndrij/cathi_sim.git 2) git clone ssh://[email protected]:3636/~gndrij/cathi_sim.git 3) git clone ssh://[email protected]:3636:cathi_sim.git 4) git clone ssh://[email protected]:cathi_sim.git

But nothing works :((.

Andrei
Welcome to Stackoverflow! You have posted this as an answer to your own question (which its not), if you intended to reply to the answer posted by *user241954* then click the *"add comment"* button under that post. Good luck!
mizipzor
A: 

Unfortunately, cygwin and mingw have a different way of mapping windows drives and directories, so before you enter a path for anything, you need to know whether it is a cygwin or mingw binary.

What I can suggest is to remove CopSSH bin directories from your PATH (at least from git bash path), so that all shell commands available use the mingw format. The only place where you would have cygwin paths would be when you do and ssh actions this way. For example, when you clone from d:\repositories\myrepo.git, you could use git clone ssh://user@srv/cygdrive/d/repositories/myrepo.git (cygwin form). To work with git in, say d:\clones\myrepo, you can use ls /d/clones/myrepo (mingw32 form).

Also, before you attempt any git clones, you can use putty or plink to make an ssh connection, and look around. If inside the ssh connection, you can do ls /home/myrepo.git, then git clone ssh://user@srv/home/myrepo.git should work.

Dysaster
Hi,Thanks for answer, a good clue that cygwin and mingw have different way for mapping windows drives.And it seems that git uses mingw format, and therefore a valid link to clone is: ssh://[email protected]:3636/work/git-bare/cathi_sim.gitThe problem here, is that I need in this way give permission to the user gndrij to d:, d:/work, d:/git-bare :(.
Andrei
What about suggestions about CopSSH bin directories and PATH. I didn't find them. My Path:PATH=c:\Programme\NVIDIA Corporation\PhysX\Common;d:\programs\php_5.3.0\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Microsoft SQL Server\90\Tools\binn\;C:\Programme\texlive\2008\bin\win32;D:\programs\TortoiseSVN\bin;D:\programs\doxygen\bin;d:\programs\Graphviz2.24\bin;D:\programs\Liquid Technologies\Liquid XML Studio 2009\XmlDataBinder7\Redist7\cpp\win32\bin;
Andrei
C:\Programme\Gemeinsame Dateien\DivX Shared\;D:\programs\MATLAB\R2007b\bin;D:\programs\MATLAB\R2007b\bin\win32;C:\Programme\TortoiseGit\bin;D:\programs\Git\cmd;C:\Programme\NVIDIA Corporation\31ctk\bin;d:\programs\.bin;D:\programs\OpenVPN\bin;d:\programs\.bin\programming_dll;D:\programs\libraries\qt-win-opensource-src-4.5.2\bin;d:\programs\pstoedit
Andrei
I've tried to use also to use git bash with copSSH (instead of /bin/bash): /cygdrive/d/programs/Git/bin/sh.exe It also failed :(. I can not do anything in putty (ls, git --version and so on) and I can not checkout at all :(.P.S. By the way, How I can add linebreaks or use formatting in reply?
Andrei
It is best to adjust our mental model to separate CopSSH environment as a separate machine. Anything you do in there is Cygwin. So if you want to adjust permissions, use the bash prompt from CopSSH start menu. When you provide paths for ssh URL, you provide a path for cygwin model. Type 'mount' in CopSSH bash to see which path correspond to what directory or drive. If you can ssh into your machine, you can experiment with paths to see where things are. To clarify what is what, you can even try to move CopSSH to a different (virtual) machine until you grasp the mappings.
Dysaster