Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
129 views
in Technique[技术] by (71.8m points)

Is there a way to not have Bitbucket ask for my password every time when doing remote Mercurial operations?

With all other Mercurial repos that I push to, I can set my username and password in my hgrc (actually, Mercurial.ini since I'm using Windows) for doing operations at a particular domain, and Mercurial won't prompt me for auth info. However, even with these settings in place, Bitbucket always asks for my password.

My settings are as follows:

[auth]
bitbucket.prefix = bitbucket.org
bitbucket.username = myusername
bitbucket.password = mypassword

As I said, these settings work for all other repos I push to.

question from:https://stackoverflow.com/questions/3933693/is-there-a-way-to-not-have-bitbucket-ask-for-my-password-every-time-when-doing-r

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Turns out the issue here was that I was using the URL for the repository displayed on my Bitbucket repository's page, which includes the username in front of the bitbucket domain name, so it ended up looking like https://myusername@bitbucket.org/myusername/myrepo.

Apparently, when the username is provided in this way, it ignores what's in the [auth] section. I just changed the URL in the hgrc for my local clone of the repo, and it picked up the [auth] section stuff just fine.

Apologies for not including this detail in the question.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...