You have 2 possibilities for generating SSH keys:
- generate a key pair on your computer (please google this for your OS) and upload the public key to c4science. !!prefered method!!
- generate a key pair on c4science and download the private key to your computer. C4science will not store your private key.
- generate a key pair on your computer (please google this for your OS) and upload the public key to c4science. !!prefered method!!
Click on the wrench at the top right corner
We will here explain how to generate a key on c4science and how to use it. If you wish to upload your key, it is pretty straightforward, please keep on reading to know how to use your key on c4science.{F230721}
Click onand then choose, from the wrench at the top right cornerleft hand side menu, `SSH Public Keys`.
{F230721}# Upload your SSH key
and then choos- Generate a key on your computer, it's important to add a passphrase for your key when prompted
```
ssh-keygen
```
- On c4science, from the left hand side menuclick on `SSH KEy actions` and then `Upload Public Key`
- Give it a name and paste the content of the `public` key
- You can find the public key by running this command
```
cat ~/.ssh/id_rsa.pub
```
- Click Upload Public Key
- And you're done, `SSH Public Keys`.you can start clone repositories using SSH
# Generate a key pair on c4science
If you don't know how to generate a key on your computer, c4science can do it for you. If you already uploaded your key, you don't need this.
Click on `SSH Key actions` and then `Generate Keypair`. Follow the dialogs and download the private key to the correct directory (this depends on your Operating System, it usually is `~/.ssh`). You will need to change the permission to the downloaded key:
```
chmod 600 ~/.ssh/id_rsa_phabricator.key
```
Now, you will need to declare which key you use for c4science. Add the following to your `~/.ssh/config` file:
```
host c4science.ch
HostName c4science.ch
IdentityFile ~/.ssh/id_rsa_phabricator.key
User git
```