当前位置: 首页 > 知识库问答 >
问题:

致命:'~peter I/public_html/public.git'似乎不是git存储库致命:无法从远程存储库读取

彭霄
2023-03-14

我有两个公共存储库:peter I

C:\Users\[path]\app>git remote -v
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (fetch)
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (push)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (fetch)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (push)

当我尝试从公共存储库peterI获取最新代码时,出现以下错误:

C:\Users\[path]\app>git fetch 
manuelM@example.net's password: [My password] 
fatal: '~peterI/public_html/public.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.

存储库肯定存在:ssh://manuelM@example.net/~peterI/public_html/public.git。我需要配置哪些访问权限?也许是关于权限的?谢谢。

更新1。我尝试了特雷弗·特雷西在他的回答中提出的建议,但没有成功:

C:\Users\[path]\app>git remote -v
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (fetch)
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (push)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (fetch)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (push)

C:\Users\[path]\app>git remote remove peterI

C:\Users\[path]\app>git remote -v
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (fetch)
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (push)

C:\Users\[path]\app>git remote add peterI ssh://manuelM@example.net/~peterI/public_html/public.git

C:\Users\[path]\app>git remote -v
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (fetch)
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (push)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (fetch)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (push)

C:\Users\[path]\app>git fetch peterI
manuelM@example.net's password: [My password]
fatal: '~peterI/public_html/public.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.


C:\Users\[path]\app>

更新2。我去看了文件. git\config,这是我在该文件末尾看到的:

[remote "peterI"]
url = ssh://manuelM@example.net/~peterI/public_html/public.git
fetch = +refs/heads/*:refs/remotes/peterI/*

公共存储库ssh://manuelM@示例。net/~ peterI/public\u html/public。git似乎在那里。我可能做错了什么?也许我需要特定权限ssh://manuelM@示例。net/~ peterI/public\u html/public。git?

更新3:我开始怀疑这是Linux中文件和文件夹权限的问题。

共有2个答案

向锦
2023-03-14

尝试git获取peter I

您还可以删除旧的遥控器:

$git remote remove peterI

并添加缺失的遥控器:

$git remote add peterI ssh://manuelM@example.net/~peterI/public_html/public.git

$git fetch peterI master
阙博容
2023-03-14

这是权限问题。我必须创建一个组并向其中添加用户。然后将Git文件夹的组所有权更改为我创建的这个组,问题就解决了。

我已经从一台服务器迁移到另一台服务器,由于某种原因,迁移过程中Git文件夹的组不同。现在一切正常,问题是权限问题。

 类似资料:
  • 我知道类似的问题已经被问过了。 但是,我相信我的问题是由于我以前犯的一个错误,因此是不同的:让我解释一下。 一切都很顺利,正如我所能做到的: git添加 本地存储库中的所有文件 git commit-m“message here”将消息添加到我的提交中 git push origin master将我的文件上载到GitHub git push heroku master将我的文件上载到heroku

  • 我正试着和git建立联系http://danielmiessler.com/study/git/#website来管理我的网站。 我已经完成了说明中的最后一步:git推送网站master:refs/heads/master 我正在使用win7中的git ming32命令行 这里的一个问题可能是程序正在寻找Bill@***. com。当我通过ssh连接到我的网站时,我有一个不同的用户名(让我们说“a

  • 我在我的Github帐户上有一个存储库,我从官方存储库中派生了这个存储库。 然后我在我的本地机器上克隆了它。它工作得很好。我创建了几个分支(在分支下)。我做了几次提交,它工作得很好。 当我这样做时,我不知道我是如何得到以下错误的: 如何在不影响Github上的存储库的情况下解决此错误? 我正在使用 我的<代码>的内容。git/config在执行cat$(git rev parse-show top

  • 我已经找了很多个小时,寻找一个解决我这个看似容易解决的问题的方法。不是我的搜索没有结果,而是我的搜索找到了这么多不同的解决方案--没有一个有效。 ‘权限被拒绝(公开密钥)。致命:无法从远程存储库读取。‘ 我已经试过(并且再三试过)用许多不同的方法来修复它。正如我所说的,在过去的两天里,我花了很大一部分时间四处寻找答案。以下是我尝试过的一些事情: heroku键:清除后跟heroku键:添加 使用'

  • 昨天我创建了一个ssh密钥并为工作克隆了一个存储库。在进行了一些更改后,我尝试推送提交: 我看过这个活跃的SO帖子。我的问题依然存在。我不知道如何追踪这个问题,所以将分享我认为相关的一切。 我的笔记本电脑上有个人和工作Rest室。我的工作生活在下嵌套的任何目录中。其他任何地方,例如都是用于个人github的。 我的.gitconfig如下所示: /.git-zen是这样的: 目前我在回购中: 有一