具有登录凭据的Bitbucket存储库克隆 [英] Bitbucket repo clone with login credentials

查看:72
本文介绍了具有登录凭据的Bitbucket存储库克隆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对bitbucket有一个基本的git clone命令,必须在其中添加登录凭据,是否可以将登录凭据添加到bitbucket git clone命令?

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

像这样吗?

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

推荐答案

您可以使用:

You can, with:

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

但这会将您的凭据保存在.git/config中的原始URL中.
为避免这种情况,您以后可以更改原点
git remote set-url origin https://myacc@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

这篇关于具有登录凭据的Bitbucket存储库克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆