Ubuntu 上的 Gitosis 只能在 git->repositories 符号链接中找到存储库

发布于 2024-10-27 12:46:58 字数 1026 浏览 6 评论 0原文

我的 Ubuntu 机器上有 gitosis,突然之间,它在旧路径上找不到任何存储库。

昨天这有效:

git clone [email protected]:myproject.git

今天,我得到回复:

fatal: 'myproject.git' does not appear to be a git repository

我没有对我的机器进行任何更改,经过一些测试,我发现我可以通过 ~gitosis 用户目录中的 git 符号链接访问存储库,所以这仍然有效:(

git clone [email protected]:git/myproject.git

git 符号链接指向同一目录中的“存储库”)

我非常希望避免更改所有克隆项目的配置文件中的远程路径。你能帮助我如何配置 git 以便我可以再次从根路径访问我的存储库吗?

更新:我发现我也无法再添加新的存储库。将存储库添加到 gitosis.conf 后,将远程源设置为包含 git/ 目录并推送它

git push origin master:refs/heads/master

I get

fatal: 'mynewproject.git' does not come to是一个 git 存储库

所以现在我只能更新现有的存储库,并且只有当我更改远程路径以包含 git 目录时。

最好的, 保罗

I have gitosis on my Ubuntu box and suddenly, it can't find any repositories on the old path.

Yesterday this worked:

git clone [email protected]:myproject.git

Today, I get the reply:

fatal: 'myproject.git' does not appear to be a git repository

I have made no changes to my machine, and after some testing I found out that I could access the repository through the git symlink in ~gitosis user directory, so this still works:

git clone [email protected]:git/myproject.git

(the git symlinks points to "repositories" in the same dir)

I would very much like to avoid having to change the remote path in the config files of all my cloned projects. Can you help me how to configure git so I can access my repositories from the root path again?

Update: I found out that also I can't add new repositories any more. After adding a repo to gitosis.conf, setting the remote origin to include the git/ dir and pushing it with

git push origin master:refs/heads/master

I get

fatal: 'mynewproject.git' does not appear to be a git repository

So now I can only update existing repositories, and only if I change the remote path to include the git dir.

Best,
Paul

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

×眷恋的温暖 2024-11-03 12:46:58

As mentioned here, using the full path means bypassing gitosis completely. So your workaround isn't actually one, and that explains why push fails.

罪#恶を代价 2024-11-03 12:46:58

唯一对我有帮助的是:

  • 使用 tar czf repos.tgz
  • 备份存储库 备份 gitosis.conf
  • 使用 aptitude 重新安装 gitosis 删除 gitosis && aptitude install gitosis
  • 在 gitosis-init 之后使用旧密钥
  • checkout gitosis-admin 将存储库移回,并将旧的 gitosis.conf 移动到目录中,然后将其推回

现在一切都在运行

The only thing that helped me was:

  • backup repositories with tar czf repos.tgz
  • backup gitosis.conf
  • reinstall gitosis with aptitude remove gitosis && aptitude install gitosis
  • move repositories back after gitosis-init with the old key
  • checkout gitosis-admin and move the old gitosis.conf into the dir, and push it back

Now everything is running

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文