gpt4 book ai didi

git - 重新创建 Gitolite-admin repo

转载 作者:太空狗 更新时间:2023-10-29 13:23:34 26 4
gpt4 key购买 nike

我接手了一个项目,前任管理员没有提供任何帮助,没有文档,也没有移交...我正在尝试克隆 gitolite-admin 存储库,以便我可以将自己添加为用户。

问题是当我运行

git clone gitolite@repo1:gitolite-admin.git

我收到错误

R access for gitolite-admin DENIED to macbook
(Or there may be no repository at the given path. Did you spell it correctly?)
fatal: The remote end hung up unexpectedly

用服务器的conf/gitolit.conf文件包含

repo    gitolite-admin
RW+ = macbook

我的存储库包含 gitolite-admin.git 等,我成功运行了

git clone gitolite@repo1:wp_of_travel

当我运行时

ssh gitolite@repo1 info

我返回了一些项目,但那里没有列出 gitolite-admin。

我的处境是绝望还是我遗漏了一些可以重建存储库并再次克隆它的东西?

如果有帮助,我确实可以完全控制服务器......

我们非常欢迎您就此事提供任何帮助或建议。谢谢

最佳答案

When I run

ssh gitolite@repo1 info

I am returned a number of projects, but gitolite-admin is not listed there.

这是正常的:如果 macbook 没有在 gitolite.conf 的那个项目中注册 repo 协议(protocol)(不是您自己的本地 gitolite.conf ,而是当前存储在 gitolite-admin.git repo 协议(protocol)中的那个),您将看不到它列出。

如果您有权访问服务器,则可以克隆 gitolite-admin.git在本地(文件协议(protocol),这里没有 ssh),添加你的名字(在你的公共(public) ssh key 之后),推回,然后运行 ​​gitolite setup (如果您使用的是 gitolite v3),以便 gitolite 更新 ~/.ssh/authorized_keys文件。


使用gitolite V2,页面 gl-admin-push : 为 gitolite-admin repo 绕过 gitolite 是有帮助的:

Clone the repo to some safe location and cd to it:

cd /tmp
git clone ~/repositories/gitolite-admin.git
cd gitolite-admin

Make whatever changes you want to that clone and commit. You can add new keys, change the conf file, or anything at all that needs fixing up. You can even reset to an older commit (rewind) if that is the simplest way to fix up some config problem that may have lost you your access.

When done, instead of git push <push arguments>, use this program instead.
For example, instead of git push -f, use gl-admin-push -f.

OP edwardgd确认 in the comments :

Looks like the previous sysadmin had done a failed installation to root as well as to the user gitolite, that was why I was getting sooo confused.
For reference the adminpush method is very simple once you know where to apply it.

关于git - 重新创建 Gitolite-admin repo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13631555/

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