Repositories / SSH Public Keys

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. The public key you will have to copy is displayed under "Public key for pasting into authorized_keys file" in PuTTyGen. The content of the public key file does not fit.

If you are using Git, there is a second option for Windows using OpenSSH (included with Git), launch Git Bash and do the following:

ssh-keygen -t rsa

You will be asked where you want to save the key. Take the default which should be something like /c/Users/<Your Name>/.ssh/id_rsa

clip </c/Users/<Your Name>/.ssh/

This will copy the public key to the clipboard so you can paste it in the step below. The filename should match the default location in the command above with a .pub extension.

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 /home/repository-authorization/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, using the PuTTy suite, launch Pageant (see its documentation) and load your private keys.

If you are using Git with OpenSSH on Windows, there is nothing to do.

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, username svn,
  • Git: server, username git,
  • Mercurial: server, 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). (If you are using OpenSSH use the ssh [email protected] from Git Bash
  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.


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"

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of nguyenduoc nguyenduoc Feb 12, 2016 at 07:14 UTC - 0 likes

    Tao ISEOVIP – TIENLEO~~ Apartment Information E-Commerce Website Is For Real Estate Largest Vietnam. At this, the customer Can Know, Book Buy Or Send Sell Property, advice and offers free Services Top About Real Estate. You are investors or individuals and families who need to stay home? You are required to learn about the real estate market? can help you! Kênh chung cư westpoint | Thông tin mở bán nhà ở xã hội westpoint hà nội | Phân phối chung cu westpoint vạn phúc | Bán nhà ở xã hội bộ quốc phòng nguyễn xiển | Mở bán chung cư the vesta phú lãm | Tin tức chung cư thông tấn xã việt nam 16 Phạm Hùng | Độc quyềnn bán Chung cư mbland Central Point Cầu Giấy | Mở bán chung cư FLC Twin Towers 265 Cầu Giấy | Thông tin chung cư thông tấn xã Vạn Phúc | Mở bán chung cư flc star tower | Tin tức chung cu flc star tower Mỹ Đình | Phân phôi chung cư tứ hiệp plaza | chung cu tu hiep plaza | tứ hiệp plaza | bán chung cư tứ hiệp plaza | chung cư pháp vân tứ hiệp | Bán flc star tower | Tin tức chung cư flc đại mỗ hà đông | Mở bán nguyễn xiển | Độc quyền bán chung cư flc garden city vạn phúc | Thông tin chung cu flc garden city Hải đăng mỹ đình | Mở bán flc garden city Mỹ Đình | Bán chung cư 122 vĩnh tuy quận 4 | Tòa nhà chung cư hpc landmark 105 Hà Đông | Khu đô thị chung cu hpc landmark 105 Nguyễn Xiển | Phân phối Chung cu BID Tower cầu giấy | Độc quyền bán hpc landmark 105 Trần Duy Hưng | Căn hộ nhà ở xã hội bright city 60 Lê Văn Lương | Thông tin chung cư hpc landmark Thanh Xuân | Khởi công chung cư hòa phát tân mai Cầu Giấy | Mở bán chung cư 493 trương định 99 Trần Bình chung cu thong tan xa | chung cu 317 truong chinh | chung cư hòa phát trương định | hòa phát tân mai | hải phát plaza | chung cư hải phát plaza | chung cu hai phat plaza | liền kề hải phát plaza | biệt thự hải phát plaza | dự án hải phát plaza | chung cư the golden an khánh | chung cư golden an khánh | chung cu the golden an khanh | the golden an khánh | the golden an khanh | golden an khánh | golden an khanhYou will easily connect with investors, real estate agencies, brokers, customers, .... when using the communication channels leading Real Estate Vietnam. APARTMENT INFORMATION - Information channel No. 1 Hanoi apartment!!!

  • Avatar of krazyipo krazyipo Jan 30, 2016 at 13:45 UTC - 0 likes
    Generating the ssh public keys are extremely useful to play games further. I do best writing service and looking forward to play my desired games with your articles.
  • Avatar of billlive billlive Dec 26, 2015 at 11:15 UTC - 0 likes

    @billlive: Go Sigh.. poor instructions on where to upload your SSH. Don't use the link.. 1. Login into the site 2. Click on your user name (top right corner) to enter your personal information 3. Click on User Management 4. Click on Repository Authorization under Repositories heading.

    The url shown that you will see in the browse, but you can't use the link to get access to configure your Private Key

  • Avatar of billlive billlive Dec 19, 2015 at 13:49 UTC - 0 likes

    When trying to access it reports an error

    Well, that was unexpected...Not found We were unable to find the page or file you were looking for.

    I am logged in and an author of a project but the link seems broken ??

  • Avatar of Dunbaratu Dunbaratu Aug 06, 2013 at 03:02 UTC - 2 likes

    @Dunbaratu: Go I found the problem. I need to use the -T command line argument for the ssh command.

    Can somebody please edit the page to make the instructions for "Testing the SSH Connection" mention the need for the "-T" argument for UNIX (and MacOS) users?

    The bit where the instructions say this:

       3. If everything went well, you should get the following message:
    Successfully connected, but no svn/git/hg command provided.

    Does not in fact happen if somebody simply types:

    ssh [email protected]

    If that's all they type, they'll get this message:

    PTY allocation request failed on channel 0

    Because the default behavior for unix SSH is to attempt to open up a shell with a TTY, and the git SSH server refuses to allow that, allowing only TTY-less connections. If you give the "-T" argument (the "T" must be uppercase) then that says to attempt to use a vanilla dumb pipe file handle for input/output instead of a TTY, and then the command works and you do see the message expected.

    Last edited Aug 06, 2013 by Dunbaratu


  • Avatar of Dunbaratu Dunbaratu Aug 05, 2013 at 22:59 UTC - 0 likes

    What does this error message from SSH mean when I tried the step where I test the ssh connection? (I'm trying to set it up for Git).

    Stevens-MacBook-Pro:~ madings$ ssh
    PTY allocation request failed on channel 0

    This is Mac OSX 10.7, command-line ssh, after having uploaded both my and keys to the curseforge site as mentioned in "Uploading Your Public Key".

    I mean, I know that PTY is the UNIX term for the device file handle on which you can read/write to a fake terminal's stdin/stdout. But what I mean is - what do I have to do to fix this? CAN I do anything to fix this? Is it a problem on the server end (too many users doing stuff so it doesn't have any more available PTY names to use?) in which case I can't do a thing about it at all, Do I assume it worked and move on to the next step?

  • Avatar of jflory7 jflory7 Jul 10, 2013 at 15:30 UTC - 0 likes

    This page was easy to follow for anyone on a Mac / Linux. I am on OS X and had the keys uploaded easily.

    For anyone on Windows, the whole "uploading the private key" part is extremely confusing and could use a little more info added to it, like where to download Pageant and how to use it in terms of adding the private keys for BukkitDev. Maybe this is common knowledge or something, but it makes it hard for me to try to help a friend who has Windows to upload his private key properly, as I honestly can't figure it out by only reading.

    Owner of CrystalCraftMC

    Moderator of SpigotMC

  • Avatar of Zerotorescue Zerotorescue Nov 30, 2011 at 22:58 UTC - 0 likes

    For Windows TortoiseHg users:

    If PuTTY is connecting properly ("Successfully connected, but no hg command provided"), but pushing still returns "no authentication method left", try using the Pageant.exe file found under C:\Program Files\TortoiseHg.

  • Avatar of Burnum Burnum Oct 05, 2008 at 02:25 UTC - 0 likes

    can we get an example of how this works?

  • Avatar of tsigo tsigo Jul 23, 2008 at 00:28 UTC - 0 likes

    This says "upload your private key to ...", but that page asks for the public key.