此帖子中的解决方案不起作用 How to provide username and password when run "git clone git@remote.git"?
git clone https://username:password@github.com/username/repository.git
严重:无法访问“http://..:无法解析主机:用户名”
最佳答案
是的,你可以。语法是:
git clone https://username:token@gitlab.com/user/repo.git
其中 username
是您的 Gitlab 用户名,token
是通过您的 gitlab 的 settings > Access Tokens 生成的
关于git - 有没有办法在一个命令中使用用户名和密码从 gitlab 克隆?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46173962/