Version 10 vs 19
Version 10 vs 19
Content Changes
Content Changes
You have 2 possibilities for generating SSH keys:
- generate a key pair on your computer 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.
# Access SSH configuration
Click on the your profile icon at the top right corner, then choose Settings
{F466030}
and then choose, from the left hand side menu, `SSH Public Keys`.
# Generate an SSH key
- Generate a key on your computer, it's important to add a passphrase for your key when prompted
```
ssh-keygen
```
# Upload your SSH key
- On c4science, click on {nav SSH Key actions > Upload Public Key}
- Give it a name and paste the content of the `public` key (the .pub file)
- You can find the public key by running this command for instance
```
cat ~/.ssh/id_rsa.pub
```
- Click `Upload Public Key`
- And you're done, 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 key:
```
chmod 600 ~/.ssh/id_rsa_phabricator.key
```
Now, configure which key to 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
```
# Using SSH from Windows
## Git Bash (preferred)
- Download [[https://git-scm.com/download/win | Git Bash for Windows]], which allow to use standard Bash commands
- Launch Git Bash
- Create and upload the key like [[https://c4science.ch/w/c4science/sshkeys/#generate-and-upload-your | documented above]] with `ssh-keygen.exe` instead, display the content of the pubkey using `cat ~/.ssh/id_rsa.pub` from git bash
- You can now clone your repository from git bash, `git clone ssh://git@c4science.ch/[...]`
- The key should be added to your SSH Agent, if not you can add your key temporarily using `eval "$(ssh-agent -s)"`
## TortoiseGIT / TortoiseSVN
- Download one or the other depending on your case,
- [[https://tortoisegit.org/download/ | TortoiseGIT]]
- [[https://tortoisesvn.net/downloads.html | TortoiseSVN]]
- After the install, run PuTTYgen
- Click Generate
- Add a passphrase to your key
- Click Save public key, this is what you'll upload to c4science on your account
- Upload the public key on your profile as [[https://c4science.ch/w/c4science/sshkeys/#generate-and-upload-your | documented above]]
- You can now clone/checkout your first repository from any explorer window by right clicking
{F899649}
You have 2 possibilities for generating SSH keys:
- generate a key pair on your computer 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 an SSH key
If you are using Windows, you must first install a Shell, see [[#using-ssh-from-windows | below]]
# Open a terminal
# Copy the text below and press {key Enter}
```
ssh-keygen -t rsa -b 4096
```
# If you have no other SSH key, keep the default file path `/home/user/.ssh/id_rsa`
# When prompted, enter a secure passphrase
# Voila, your public and private key pair is located at `/home/user/.ssh/`
# Upload your SSH key
- At the top right on your user icon, select `Settings`
- On the left menu, go to {nav AUTHENTICATION > SSH Public Keys}
- At the top right, click on {nav SSH Key actions > Upload Public Key}
- Give it a name and paste the content of the `public` key (the .pub file)
- You can find the public key by running this command
```
cat ~/.ssh/id_rsa.pub
```
- Click `Upload Public Key`
- And you're done, 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 {nav SSH Key actions >Generate Keypair}. Follow the dialog and download the private key to the correct directory (this depends on your Operating System, it usually is `~/.ssh`). Rename the keys to `id_rsa` and `id_rsa.pub` or SSH won't recognize them (see below).
You will also need to change the permission of the key:
```
chmod 600 ~/.ssh/id_rsa
```
If you don't have the standard key name `id_rsa`, configure SSH to use your custom key. Add the following to your `~/.ssh/config` file:
```
host c4science.ch
HostName c4science.ch
IdentityFile ~/.ssh/id_rsa_phabricator.key
User git
```
# Using SSH from Windows
## Git Bash (preferred)
- Download [[https://git-scm.com/download/win | Git Bash for Windows]], which allow to use standard Bash commands
- Launch Git Bash
- Create and upload the key like [[https://c4science.ch/w/c4science/sshkeys/#generate-an-ssh-key | documented above]] with `ssh-keygen.exe` instead, display the content of the pubkey using `cat ~/.ssh/id_rsa.pub` from git bash
- You can now clone your repository from git bash, `git clone ssh://git@c4science.ch/[...]`
- The key should be added to your SSH Agent, if not you can add your key temporarily using `eval "$(ssh-agent -s)"`
## TortoiseGIT / TortoiseSVN
- Download one or the other depending on your case,
- [[https://tortoisegit.org/download/ | TortoiseGIT]]
- [[https://tortoisesvn.net/downloads.html | TortoiseSVN]]
- After the install, run PuTTYgen
- Click Generate
- Add a passphrase to your key
- Click Save public key, this is what you'll upload to c4science on your account
- Upload the public key on your profile as [[https://c4science.ch/w/c4science/sshkeys/#upload-your-ssh-key | documented above]]
- You can now clone/checkout your first repository from any explorer window by right clicking
{F899649}
You have 2 possibilities for generating SSH keys:
- generate a key pair on your computer 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.
# Access SSH configuration# Generate an SSH key
Click on the your profile icon at the top right cornerIf you are using Windows, you must first install a Shell, then choose Settingssee [[#using-ssh-from-windows | below]]
{F466030}
and then choose, from the left hand side menu, `SSH Public Keys`.
# Generate an SSH key
- Generate a key on your computer, it's important to add a passphrase for your key when prompted# Open a terminal
# Copy the text below and press {key Enter}
```
ssh-keygen -t rsa -b 4096
```
# If you have no other SSH key, keep the default file path `/home/user/.ssh/id_rsa`
ssh-keygen# When prompted, enter a secure passphrase
```# Voila, your public and private key pair is located at `/home/user/.ssh/`
# Upload your SSH key
- On c4scienceAt the top right on your user icon, select `Settings`
- On the left menu, go to {nav AUTHENTICATION > SSH Public Keys}
- At the top right, click on {nav SSH Key actions > Upload Public Key}
- Give it a name and paste the content of the `public` key (the .pub file)
- You can find the public key by running this command for instance
```
cat ~/.ssh/id_rsa.pub
```
- Click `Upload Public Key`
- And you're done, 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 `{nav 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`). Rename the keys to `id_rsa` and `id_rsa.pub` or SSH won't recognize them (see below).
You willll also need to change the permission toof the key:
```
chmod 600 ~/.ssh/id_rsa_phabricator.key
```
NowIf you don't have the standard key name `id_rsa`, configure which keySSH to use for c4scienceyour custom key. Add the following to your `~/.ssh/config` file:
```
host c4science.ch
HostName c4science.ch
IdentityFile ~/.ssh/id_rsa_phabricator.key
User git
```
# Using SSH from Windows
## Git Bash (preferred)
- Download [[https://git-scm.com/download/win | Git Bash for Windows]], which allow to use standard Bash commands
- Launch Git Bash
- Create and upload the key like [[https://c4science.ch/w/c4science/sshkeys/#generate-and-upload-your-ssh-key | documented above]] with `ssh-keygen.exe` instead, display the content of the pubkey using `cat ~/.ssh/id_rsa.pub` from git bash
- You can now clone your repository from git bash, `git clone ssh://git@c4science.ch/[...]`
- The key should be added to your SSH Agent, if not you can add your key temporarily using `eval "$(ssh-agent -s)"`
## TortoiseGIT / TortoiseSVN
- Download one or the other depending on your case,
- [[https://tortoisegit.org/download/ | TortoiseGIT]]
- [[https://tortoisesvn.net/downloads.html | TortoiseSVN]]
- After the install, run PuTTYgen
- Click Generate
- Add a passphrase to your key
- Click Save public key, this is what you'll upload to c4science on your account
- Upload the public key on your profile as [[https://c4science.ch/w/c4science/sshkeys/#generate-and-upload-yourupload-your-ssh-key | documented above]]
- You can now clone/checkout your first repository from any explorer window by right clicking
{F899649}
c4science · Help