<commit_before>---
published: true
title: Github
tags: github ssh
---
## [Connect to GitHub with SSH](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh)

### Find and take a note of your public key fingerprint. 
to recognize which key belong to who
{% highlight bash %}
$ ssh-add -l -E sha256
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
{% endhighlight %}

### [Generating a new ssh key](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)

Use one key per origin host, no need to change the default file.

{% highlight bash %}
yves@yves-lab ~ > ssh-keygen -t rsa -b 4096 -C "yves-lab"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/yves/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in github_rsa
Your public key has been saved in github_rsa.pub
{% endhighlight %}

### [Add your public key to GitHub](https://jdblischak.github.io/2014-09-18-chicago/novice/git/05-sshkeys.html)
<commit_msg>[github]<commit_after>---
published: true
title: Github
tags: git ssh
---
## [Connect to GitHub with SSH](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh)

### Find and take a note of your public key fingerprint. 
to recognize which key belong to who
{% highlight bash %}
$ ssh-add -l -E sha256
> 2048 SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ /Users/USERNAME/.ssh/id_rsa (RSA)
{% endhighlight %}

### [Generating a new ssh key](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)

Use one key per origin host, no need to change the default file.

{% highlight bash %}
yves@yves-lab ~ > ssh-keygen -t rsa -b 4096 -C "yves-lab"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/yves/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in github_rsa
Your public key has been saved in github_rsa.pub
{% endhighlight %}

### [Add your public key to GitHub](https://jdblischak.github.io/2014-09-18-chicago/novice/git/05-sshkeys.html)
{'fraction_non_alphanumeric': 0.12903225806451613, 'fraction_numerical': 0.025136154168412233, 'mean_word_length': 4.306666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4121624', 'n_tokens_mistral': 928, 'n_tokens_neox': 821, 'n_words': 230}