问题
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