WowAce.com Knowledge base

Repositories / SSH Public Keys

r9

Repository write access is handled by SSH tunnels that require the SSH public/private key system.

Generating your SSH key pair

On Windows, using the PuTTy suite is recommended. You can use PuTTyGen to generate your public and private key pair. Reading PuTTy documentation about key authentication is strongly recommended.

On *nix (including Mac OS X), you can just pop open a terminal and use ssh-keygen.

As an alternative, less secure, method we also will generate ssh keys for you. This is accessible at: /home/generate-keys/

Uploading your public key

When you have your ssh keys created, upload your public key to /users/current-profile/repository-aut.../edit/ and you should be able to use that key to have write access to projects that you are a member of.

Be sure to copy the public key as one line without any space in the central part. Your public key should look like one of these depending on its type:

  • RSA key for SSH2 (recommended):
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAvnUSCZFxE6p72IeFjYpx4R8e0uyDGARigTwtCvDdRYzD1Nbk1NXOyz1wi5WP/hEk80Qf8HoQ45D6xkyMr/FNL9yiWtlFptForphSnkZZo9L4/gk5rx9+Gg8P/u/sdx2AaKcugxn2g9s0eYotHOjl9OCIeC6rLePbxEJtQeQzsx0= optional comment
  • DSA key for SSH2:
ssh-dss AAAAB3NzaC1kc3MAAACBAPNQ4gdGh0m1FZ731L4lLBOx4YEoUtymX212sp0/CbAJ30CAH4NPvCMSHbQdlO9y9vwcQimQE1fBVthAnaKrWNyjl9zIsvPqCC58Bn2w0OE0by23pjnF3egdDjKbamhBKZyjhfq6JekV2s8qFmn8Lr07Wrr7nVtgH50LEqoxQl2hAAAAFQDHjbBvHJEbn45Pns/8VKx4ubhFqwAAAIAtZzfls0+xGD2bcGs6A2oqtxdLQiXxNIndSwgcGOIMr2Dj3M7/L+YOGdMGTk0mBoHgnAtWFQMfHnp+5ka0NtIyPJhB4TvF1KC4GZ+TMLdeZCSODLt1BD6TiGPj30oFAVflS/CWmaPy9q6xwB+ONyACOEINCsgOlCRE52PwSQBGewAAAIAZDj8y+YClQ1N5eWMErHciqWd0WHZGfkKGrUs0EzNItNN/kqnOiuazTTOs3595lpz7MTguvMkaveQRGkxsTy3WqqruEAGv+9T/BZEE5yOBEdCkNUnLJ5xQyMwpWODD7RMhWRfjk8CQmug1Zu9w6HGOQvQeEGwls4ku7+fH7bTRAg==  optional comment

Starting a SSH agent and loading your private key

On Windows, launch Pageant (see its documentation) and load your private keys.

Most *nix distributions commonly ships a SSH agent loaded on graphical login. Just try ssh-add to load your private key. If it failed, you had to launch ssh-agent and tried ssh-add again.

This is required prior to any SSH access to the repository.

Testing the SSH connection

The server and username depend on the type of repository you are using:

  • Subversion: server svn.wowace.com, username svn,
  • Git: server git.wowace.com, username git,
  • Mercurial: server hg.wowace.com, username hg,

Those will be used in any subsequent SSH connection to the repository.

Follow these steps to test the connection:

  1. Try to connect to the server using either ssh (*nix) or PuTTy (Windows).
  2. On first connection, you should be asked to accept the server key or not. Accept it.
  3. If everything went well, you should get the following message:
Successfully connected, but no svn/git/hg command provided.


The SSH key are now set up correctly. You can then start to use your Subversion/Git/Mercurial client using SSH tunnels. You may still have errors accessing the repository but they should not be related to the SSH keys.

Troubleshooting

If anything goes wrong, please check that:

  • you uploaded your public key in the right format,
  • you have a SSH agent running with the corresponding private key loaded,
  • you are trying to connect to the server and the username corresponding to your repository type.

Common error messages:

  • SSH error: "no authentication method left": the authentication with the public key failed, either because you have not uploaded it correctly or you have not loaded it in your SSH agent,
  • SVN error: "Authorization failed": the SSH authentication succeded but you do not have the privilege to access the repository, it may be because the repository is private and you are not listed in the author list or because the project has been abandonned or deleted. Finally it sometimes happens when the authorization script bugged, you will have to contact an site administrator.

When asking help on the forums or IRC, please provide the answers to the following questions:

  • which OS are you running, including version ?
  • which SSH software are you using, including version ?
  • the repository URL are you trying to connect to ?
  • what error message did you get, if any ?

Additional information

  • on msysgit installation (a git distribution for Windows), select the option "use plink" and select where you installed plink.exe. This allows the use of your SSH key through pageant.
  • if you want to use Subversion CLI client on Windows, edit the variable "ssh" of your Subversion config file (somewhere in a Subversion directory of your %USERPROFILE%) to point to plink.exe, e.g. :
 ssh = "C:\\Program Files\\PuTTY\\plink.exe"