如何浏览服务器上的 Git 存储库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25607121/
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
How do I browse Git repositories on a server?
提问by lornova
I was told to clone the repository bar
with this command:
我被告知bar
使用以下命令克隆存储库:
git clone git@server:foo/bar
I know that there are other repositories under server:foo
(e.g server:foo/dummy
, server:foo/ihategit
, server:foo/xxx
and so on). I have permission to access these repositories, but I don't know their names.
我知道有在其他存储库server:foo
(例如server:foo/dummy
,server:foo/ihategit
,server:foo/xxx
等)。我有权访问这些存储库,但我不知道它们的名称。
Is there a way to list all the repositories under server:foo
?
有没有办法列出下的所有存储库server:foo
?
回答by Jo?l Salamin
The Stack Overflow post Browse Git repository without cloningmay help you. If you want to list a remote repository without having to clone it locally, you'll need to connect through SSH in order to access it from the server:
Stack Overflow 帖子Browse Git repository without cloning可能对您有所帮助。如果要列出远程存储库而不必在本地克隆它,则需要通过 SSH 连接才能从服务器访问它:
回答by vgoff
It seems like you want to view the collection of that "users" repositories.
您似乎想查看该“用户”存储库的集合。
On GitHub, for example, this is similar to going to https://github.com/foo?tab=repositories
例如,在 GitHub 上,这类似于转到 https://github.com/foo?tab=repositories
It will depend on which interface the server is using and whether or not they implement a view that is similar to GitHub's. GitLab by default has no such view, has a similar view, for example: https://gitlab.com/gitlab-orgwould have a view of all repositories that you have access to. (If the server were Bitbucket and the user were foo, then https://bitbucket.org/foo
.)
这将取决于服务器使用的接口以及它们是否实现了类似于 GitHub 的视图。GitLab默认没有这样的视图,有一个类似的视图,例如:https: //gitlab.com/gitlab-org将拥有您有权访问的所有存储库的视图。(如果服务器是 Bitbucket 而用户是 foo,那么https://bitbucket.org/foo
.)
In the case of a private server, this answermay shed more light.
在私人服务器的情况下,这个答案可能会更清楚。