无人机如何克隆存储库?
对于GitLab,如果我获得了client_id和client_secret,则如何克隆存储库,就像无人机的作用一样。有没有API或其他东西?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
对于GitLab,如果我获得了client_id和client_secret,则如何克隆存储库,就像无人机的作用一样。有没有API或其他东西?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
由于
git clone
本机命令。然后,您可以尝试使用:(
假设
client_secret
是令牌)或:(
用实际值替换client_id),
但是,这被视为不良练习,:
最好缓存这些凭据:
/stackoverflow.com/a/72649714/6309"> git 和
client_secret
通过其实际值),然后
在URL中不再使用令牌/秘密。
The is no "GitLab API" for cloning, since
git clone
native command is there for that.You could then try and clone with:
(assuming the
client_secret
is the token)Or:
(replace client_id by the actual value)
However, this is considered bad practice, and Git 2.37 (Q3 2022) will display the warning:
It is better to cache those credentials:
(replace
xxx
,client_id
andclient_secret
by their actual values)And then
No more token/secret in the URL.