简体   繁体   中英

Setting up Git server on Windows with CopSSH, but got this error: does not appear to be a git repository

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.

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.

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