libgit2 支持哪些传输协议进行克隆?
What transfer protocols does libgit2 support for cloning?
我正在编写一个程序,它可以采用 Git 克隆 URI 并在用户计算机上克隆存储库。为此,程序需要知道何时可以继续克隆,何时需要放弃。 man page for git-clone 表示:
Git supports ssh, git, http, and https protocols (in addition, ftp, and ftps can be used for fetching and rsync can be used for fetching and pushing, but these are inefficient and deprecated; do not use them).
libgit2 支持多少?
我知道至少他们支持HTTP, HTTPS and SSH,但其他人呢?
tl;dr:本地,git,ssh,http,https。它不支持也从未支持 ftp、ftps 或 rsync.
注意:这是从 v0.23.4 开始的所有内容。
libgit2 支持的传输机制列表可以在它们的 "transport" section 中找到。这些是高级传输算法。特定的网络协议是子传输。
- 虚拟
- 本地
- 聪明
- ssh-with-paths
其中,我们只关心 local
和 smart
(请参阅您可能永远不会使用的 transport.c). local
is for local files like file:///home/foo/some_project
. ssh-with-paths
is a wrapper around smart-ssh that lets you explicitly state which programs on the remote to use。网络上的任何内容都使用 smart
。
"smart" protocol is one which expects the remote to be more than just a file server. Instead of having to do all the work to determine what objects are needed by requesting files and figuring it all out locally, it can call certain programs on the remote to do that work more efficiently. Here's a discussion of the smart vs dumb protocols.
libgit2 支持哪些智能网络协议在他们的 "smart" section.
中
- ssh
- http
- https
- git
您可以在 transport.c 中查看更多详细信息。
至于弃用的协议ftp、ftps和rsync,libgit2不支持它们,从their change log可以看出它们从未支持过它们.另外我不知道 libgit2 是否支持哑协议。
我正在编写一个程序,它可以采用 Git 克隆 URI 并在用户计算机上克隆存储库。为此,程序需要知道何时可以继续克隆,何时需要放弃。 man page for git-clone 表示:
Git supports ssh, git, http, and https protocols (in addition, ftp, and ftps can be used for fetching and rsync can be used for fetching and pushing, but these are inefficient and deprecated; do not use them).
libgit2 支持多少?
我知道至少他们支持HTTP, HTTPS and SSH,但其他人呢?
tl;dr:本地,git,ssh,http,https。它不支持也从未支持 ftp、ftps 或 rsync.
注意:这是从 v0.23.4 开始的所有内容。
libgit2 支持的传输机制列表可以在它们的 "transport" section 中找到。这些是高级传输算法。特定的网络协议是子传输。
- 虚拟
- 本地
- 聪明
- ssh-with-paths
其中,我们只关心 local
和 smart
(请参阅您可能永远不会使用的 transport.c). local
is for local files like file:///home/foo/some_project
. ssh-with-paths
is a wrapper around smart-ssh that lets you explicitly state which programs on the remote to use。网络上的任何内容都使用 smart
。
"smart" protocol is one which expects the remote to be more than just a file server. Instead of having to do all the work to determine what objects are needed by requesting files and figuring it all out locally, it can call certain programs on the remote to do that work more efficiently. Here's a discussion of the smart vs dumb protocols.
libgit2 支持哪些智能网络协议在他们的 "smart" section.
中- ssh
- http
- https
- git
您可以在 transport.c 中查看更多详细信息。
至于弃用的协议ftp、ftps和rsync,libgit2不支持它们,从their change log可以看出它们从未支持过它们.另外我不知道 libgit2 是否支持哑协议。