删除 Git 存储库 Gitolite?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5755449/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Deleting Git Repository Gitolite?
提问by ryanzec
I am wondering what the proper way is to delete a repository when using gitolite.
我想知道在使用 gitolite 时删除存储库的正确方法是什么。
Is there anything else I have to do besides delete the repository from the server and remove all configurations related to the repository I am removing?
除了从服务器中删除存储库并删除与我要删除的存储库相关的所有配置之外,我还有什么需要做的吗?
采纳答案by Artusamak
Nope! That's all you have to do!
不!这就是你所要做的!
回答by Potherca
Deleting the repository from the server and removing all configurations is all you have to do.
您只需从服务器中删除存储库并删除所有配置即可。
Quoting from the manual:
引用手册:
Removing a repo is not so straightforward. You certainly must remove the appropriate lines from the conf/gitolite.conf file, but gitolite will not automatically delete the repo from the server. You have to log on to the server and do the dirty deed yourself :-)
It is best to make the change in the conf file, push it, and then go to the server and do what you need to.
删除 repo 并不是那么简单。您当然必须从 conf/gitolite.conf 文件中删除相应的行,但 gitolite 不会自动从服务器中删除 repo。你必须登录到服务器并自己做肮脏的事情:-)
最好在conf文件中进行更改,推送它,然后转到服务器并执行您需要的操作。
回答by Lmickos
Actually there is another more formal way to do this through the Apis. This is a more practical way when giving away to users the privilige to create their own repos (wild repos).
实际上,还有另一种更正式的方法可以通过 API 做到这一点。当授予用户创建自己的存储库(野生存储库)的特权时,这是一种更实用的方法。
This requires:
这需要:
- Admin enables the D command by removing the appropriate commented line (on the server) in $HOME/.gitolite.rc
- Unlocking the repository (safety procedure) "ssh gitolite@hostname D unlock reponame"
- Deleteing the repository with "ssh gitolite@hostname D rm reponame"
- 管理员通过删除 $HOME/.gitolite.rc 中适当的注释行(在服务器上)来启用 D 命令
- 解锁存储库(安全程序)“ssh gitolite@hostname D unlock reponame”
- 使用“ssh gitolite@hostname D rm reponame”删除存储库
Some simple documentation can be found in the Gitolite docsbut the documentation is better in the book "Gitolite Essentials".
一些简单的文档可以在Gitolite 文档中找到,但文档在“Gitolite Essentials”一书中更好。