使用gitlab令牌克隆而不进行身份验证 [英] using gitlab token to clone without authentication
本文介绍了使用gitlab令牌克隆而不进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过使用我的gitlab帐户中的私有令牌来克隆gitlab存储库,而不提示我输入自动化脚本.
I want to clone gitlab repository without prompt for my automation script, by using my private token from my gitlab account.
有人可以给我提供样品吗?
Can someone provide me a sample?
我知道我可以使用用户名和密码来这样做:
I know I can do so with user and password:
git clone https://" + user + ":" + password + "@" + gitlaburl;
我知道使用ssh键是可能的
and I know it is possible with ssh key
但是,这两个选项都不足够
but, both options are not sufficent
推荐答案
我知道这很老,但这是您的操作方式:
I know this is old but this is how you do it:
git clone https://oauth2:ACCESS_TOKEN@somegitlab.com/vendor/package.git
这篇关于使用gitlab令牌克隆而不进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文