Fix a SSH URL parsing issue breaking private GitHub repositories.

Review Request #2014 — Created Dec. 25, 2010 and submitted

Information

Review Board

Reviewers

Fix a SSH URL parsing issue breaking private GitHub repositories.

The code to parse a SSH-based URL to extract the hostname and username
was giving precedence to the username provided to the function, rather than
that in the URL. In the case of private GitHub repositories, the server
needed to be accessed with the "git" user, but we were using the
repository owner's username instead.

We now give precedence to the URL, using the provided username as the
fallback. This fixes adding private GitHub repositories (so long as
the Review Board instance has a DSA or RSA keypair and the public key is
added to the GitHub repository).
I was able to add a private GitHub repository on new Review Board server
with a fresh RSA keypair added to GitHub.
chipx86
  1. I accidentally already committed this, but well, take a look anyway and make sure I'm sane :)
  2. 
      
david
  1. Ship It!
  2.