Sunday, March 8, 2009

bzr svn: 'unsupported protocol'

Update (Aug 2009): this is a workaround for a bug that's been fixed for a while in the stable bzr versions.

This is something I've banged my head against for a nontrivial while when working with bzr and a subversion repository requiring authentication:

> bzr push http://svnrepos.example.net/trunk
bzr: ERROR: Invalid http response for http://.../.bzr/branch-format: Unable to handle http code 401: Authorization Required

Hard-coding 'http+svn' used to work (and give a warning), but it doesn't in the latest versions:

> bzr push http+svn://svnrepos.example.net/trunk
bzr: ERROR: Unsupported protocol for url "http+svn://..."

There's a ticket in progress about this issue, but there's a simple workaround: specify the username in the URL with http://username@host:

> bzr push http://username@svnrepos.example.net/trunk

Success!

2 comments:

  1. Just as a reminder, that bug was fixed in April this year; give a newer release a spin and if it works well a comment to that effect there would be appreciated.

    ReplyDelete
  2. Thanks kiko. My intent wasn't to document the bug - it was to document the workaround that I missed. I'll update the post.

    ReplyDelete