Bitbucket repo clone with login credentials

本小妞迷上赌 提交于 2020-01-03 03:29:08

问题


I have a Basic git clone command to bitbucket in which I have to add Login credentials, is it possible to add Login credentials to a bitbucket git clone command?

https://myacc@bitbucket.org/myacc/app.git

Something like this?

https://myacc@bitbucket.org/myacc/app.git -Password "123"

回答1:


You can, with:

git clone https://user:password@bitbucket.org/myacc/app.git

But this will save your credentials in the origin url in .git/config.
To avoid that you could change the origin afterwards
git remote set-url origin https://myacc@bitbucket.org/myacc/app.git



来源:https://stackoverflow.com/questions/52869520/bitbucket-repo-clone-with-login-credentials

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!