Specify a default username for bzr+ssh
Problem: I have commit access to a bzr repository via a specific username (stecor) and a ssh key. It works on machine A because my username on this machine is stecor. I have a machine B on which I have an account but with a different username. I have copied the ssh key and the purely ssh connection to the server works well using the ssh key. Yet, bzr will not let me branch or commit to the server from that machine B because it uses by default the username of the account, which does not match the one I have registered on the server. I found the solution on the bzr documentation site: create a file ~/.bazaar/authentication.conf and add the following to it:
[DEFAULT]
user=stecorwhere stecor is the username you want bzr to use by default (instead of the username of your local unix account). When using SSH to connect, also make sure you use a absolute path as opposed to a URL. Here are 2 examples:
Command for an anonymous check-out:
bzr branch bzr://vcs.happypixels.net/drupal-rdf/ my-drupal-rdf-working-copyCommand for a user registered on the bzr server (over SSH):
bzr branch bzr+ssh://happypixels.net/srv/bzr/repo/drupal-rdf/ my-drupal-rdf-working-copy
Add new comment