gpt4 book ai didi

git - 使用 CopSSH 在 Windows 上设置 Git 服务器,但出现此错误 : does not appear to be a git repository

转载 作者:太空狗 更新时间:2023-10-29 14:39:18 24 4
gpt4 key购买 nike

我按照以下步骤设置 Git 服务器:https://github.com/msysgit/msysgit/wiki/Setting-up-a-Git-server-on-Windows-using-Git-for-Windows-and-CopSSH ,一切正常,直到我从服务器克隆存储库的最后一步。

在设置过程中,我遇到了一些其他错误,但都已解决。它们是:

  1. 文件 libiconv-2.dll 未找到:将文件 libiconv-2.dllgit/bin 复制到 ICW/Bin.
  2. 未找到文件 git-receive-pack.exe:创建 3 软链接(soft link) git-receive-pack.exe, git-upload-pack.exegit-upload-archive.exe 位于ICW/Bin,源文件为git/libexec/git -核心/*.

在从服务器克隆存储库的最后一步,我得到了这个错误:

我遇到了这个错误:

$ 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.

有人可以帮忙吗?谢谢。

最佳答案

我相信本教程旨在在 git bash session 中工作来自 msysgit (如 in here )。
不在 cygwin session 中(这解释了您的 dll 问题或软链接(soft link)创建)。

最后一步是:

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

建议这样的命令:

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

我会推荐 not using cygwin (如 explained here ),并改用 msysgit。

关于git - 使用 CopSSH 在 Windows 上设置 Git 服务器,但出现此错误 : does not appear to be a git repository,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17463344/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com