How to fix "remote: ssl required" when pushing to Bitbucket?
Asked Answered
J

1

13

I am getting the above error whenever I try to push my changes. I am using TortoiseHg as client.

Here is the debug output for hg push:

pushing to https://[email protected]/nulldev/windows-phone    
using https://bitbucket.org/nulldev/windows-phone    
proxying through http://[proxy - omitted]
http auth: user nulldev, password not set    
sending capabilities command    
bitbucket.org certificate successfully verified    
[HgKeyring] Keyring URL: https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Looking for password for user nulldev and url https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Keyring password found. Url: https://bitbucket.org/nulldev/windows-phone, user: nulldev, passwd: ********    
bitbucket.org certificate successfully verified    
query 1; heads    
sending batch command    
bitbucket.org certificate successfully verified    
[HgKeyring] Keyring URL: https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Cached auth data found. Url: https://bitbucket.org/nulldev/windows-phone, user: nulldev, passwd: ********    
bitbucket.org certificate successfully verified    
searching for changes    
all remote heads known locally    
sending branchmap command    
bitbucket.org certificate successfully verified    
[HgKeyring] Keyring URL: https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Cached auth data found. Url: https://bitbucket.org/nulldev/windows-phone, user: nulldev, passwd: ********    
bitbucket.org certificate successfully verified    
sending branchmap command    
bitbucket.org certificate successfully verified    
[HgKeyring] Keyring URL: https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Cached auth data found. Url: https://bitbucket.org/nulldev/windows-phone, user: nulldev, passwd: ********    
bitbucket.org certificate successfully verified    
preparing listkeys for "bookmarks"    
sending listkeys command    
bitbucket.org certificate successfully verified    
[HgKeyring] Keyring URL: https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Cached auth data found. Url: https://bitbucket.org/nulldev/windows-phone, user: nulldev, passwd: ********    
bitbucket.org certificate successfully verified    
1 changesets found    
list of changesets:
35b9240f7e7a5eee7936d8559962971e94fab1fc    
bundling: 1/1 changesets (100.00%)    
bundling: 1/1 manifests (100.00%)    
bundling: Key Ring/Controls/BindableApplicationBarIconButton.xaml.cs 1/1 files (100.00%)    
sending unbundle command    
sending 431 bytes    
bitbucket.org certificate successfully verified    
sending: 0 kb    
sending: 0 kb    
[HgKeyring] Keyring URL: https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Cached auth data found. Url: https://bitbucket.org/nulldev/windows-phone, user: nulldev, passwd: ********    
bitbucket.org certificate successfully verified    
sending: 0 kb    
sending: 0 kb    
remote: ssl required    
preparing listkeys for "phases"    
sending listkeys command    
bitbucket.org certificate successfully verified    
[HgKeyring] Keyring URL: https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Cached auth data found. Url: https://bitbucket.org/nulldev/windows-phone, user: nulldev, passwd: ********    
bitbucket.org certificate successfully verified    
try to push obsolete markers to remote    
checking for updated bookmarks    
preparing listkeys for "bookmarks"
sending listkeys command    
bitbucket.org certificate successfully verified    
[HgKeyring] Keyring URL: https://bitbucket.org/nulldev/windows-phone    
[HgKeyring] Cached auth data found. Url: https://bitbucket.org/nulldev/windows-phone, user: nulldev, passwd: ********    
bitbucket.org certificate successfully verified
Jeanninejeans answered 23/8, 2012 at 14:6 Comment(1)
You should probably add a little more information, like the repo URL you're trying to push to and any other debug/warning output.Whitewood
D
31

This is usually due to a config issue on the server side (ie on BitBucket's side), as illustrated by this old ticket (which suddenly got a few new entries, all mentioning your error).

pushing to https://[email protected]/nulldev/windows-phone
http authorization required
realm: Bitbucket.org HTTP
user: nulldev
password: 
searching for changes
remote: ssl required

As explained in "Remote repos":

What happens is that Mercurial’s webserver won’t let you push over plain HTTP by default, it requires you to use a HTTPS URL.
Alice can disable this requirement by using --config web.push_ssl=No on the command line when she serves the repository

So I suppose that on BitBucket side, they need to make sure the repo are served with:

hg serve --config web.push_ssl=No --config "web.allow_push=*" 
Dekeles answered 23/8, 2012 at 14:22 Comment(5)
Thats my entry there! :) Anyways, are you sure I should ask them for changes to their server? Also, what if I do want to push my changes using SSL?Jeanninejeans
@Jeanninejeans They need to authorize https pushing, and it seems they didn't. They can configure it to authorize both. In the meantime, try indeed a push using ssh, to see if that works.Dekeles
Well, the ssh wont work for me (something to do with firewall and proxy - its not my home network).Jeanninejeans
@Jeanninejeans proxy isn't an issue as long as you set the HTTP_PROXY/HTTPS_PROXY environment variables. But for https only, not ssh. Ssh for external sites is always blocked at work, indeed.Dekeles
The BB guys have started to work on it. They fixed this one, and now I have another - probably unrelated - issue on HTTPS. And yes, ssh is working at my home. I am going to accept this one as answer.Jeanninejeans

© 2022 - 2024 — McMap. All rights reserved.