2

I follow the steps to set up the Git server here: https://github.com/msysgit/msysgit/wiki/Setting-up-a-Git-server-on-Windows-using-Git-for-Windows-and-CopSSH , everything work correctly until the last step that I clone the repository from server.

At the middle of setting up, I encoundted some other errors, but are all solved. They are:

  1. File libiconv-2.dll not found: copy the file libiconv-2.dll from git/bin to the ICW/Bin.
  2. File git-receive-pack.exe not found: create 3 soft link git-receive-pack.exe, git-upload-pack.exe, git-upload-archive.exe at ICW/Bin, the source files are git/libexec/git-core/*.

At the last step that clone repository from server, I got this error:

I got this error:

$ git clone git@127.0.0.1:/cygdrive/d/GitRepo/Test.git
Cloning into 'Test'...
fatal: '/cygdrive/d/GitRepo/Test.git' does not appear to be a git repository
fatal: Could not read from remote repository.

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

Any one can help? Thanks.

Albert Zhang
  • 687
  • 1
  • 7
  • 19

1 Answers1

4

I believe the tutorial is intended to work in a git bash session from msysgit (as in here).
Not in a cygwin session (and that explains your dll issue or softlink creations).

The last step is:

git clone {username}@{servername}:{repodriveletter}:/{repopath}

Which suggests a command like:

git clone git@127.0.0.1:/D/GitRepo/Test.git
# or, as the OP found out:
git clone git@127.0.0.1:d:/GitRepo/Test.git

I would recommend not using cygwin (as explained here), and use msysgit instead.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • `git clone git@127.0.0.1:/D/GitRepo/Test.git` still not working. But this is working: `git clone git@127.0.0.1:d:/GitRepo/Test.git`. Thanks! – Albert Zhang Jul 04 '13 at 07:49
  • @AlbertZhang Excellent. I have added this syntax in the answer for more visibility. Did you still used the git from cygwin? – VonC Jul 04 '13 at 08:10
  • I'm kind of lost in the "sessions". Does a "session" means a shell? I remember that the configuration of CopSSH is done in the Unix Shell from CopSSH (_Start Menu > Copssh > 03. Start a Unix BASH Shell_). And create the repository, testing clone is done in the git bash (_Start Menu > Git > Git Bash_). – Albert Zhang Jul 05 '13 at 02:06
  • 1
    @AlbertZhang the Git Bash shell is a Unix Shell, which defines a `$HOME` for you (see http://stackoverflow.com/a/3455231/6309). So you can configure your CopSSH in *that* (git-bash) session. – VonC Jul 05 '13 at 05:11
  • you made my day. Thanks. – svlzx Jan 22 '14 at 22:29