Using git in notebook.¶
GitSSH¶
- Open terminal in notebook.
- Install openSSH client.
apt-get install openssh-client
- Genrate ssh public/private keys.
Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:7IixNOcnYPgtFzrl5b2NYxsALymKupsG3ShEGCRWhRs root@dc-notebook-a480809a-a74f9a6abce6-65db45547shxmq
- Copy public key with cat.
cat /root/.ssh/id_rsa.pub
-
Open Github. Open settings. Select SSH and GPG keys
-
Click New SSH key.
-
Paste your public key into the Key field
Warning
New projects do not take password. It is possible your conda cache is corrupted.
conda clean --index-cache