Skip to content

Instantly share code, notes, and snippets.

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@StefanoAgazzi
StefanoAgazzi / guide.md
Created September 30, 2023 09:57 — forked from Kranzes/guide.md
SSH Resident Key Guide

Initial checks

Start by checking that there aren't any previous ssh keys inside the FIDO2 authenticator of your YubiKey. You can check if they exist by running the command below:

nix shell nixpkgs#yubikey-manager -c ykman fido credentials list

If the command above outputs a string mentioning "ssh" or "openssh", then you have already got a key generated and store on your YubiKey.

Evaluating additional authentication factors

Before generating a new ssh key to store on your YubiKey you must consider which additional required authentication factors you want to use. Below you can see a table with the available factors and their corresponding command:

@StefanoAgazzi
StefanoAgazzi / openpgp.txt
Created November 14, 2017 23:51
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:18739600a6f25ed0f5e553baa5e6006e2b27ea29]
@StefanoAgazzi
StefanoAgazzi / openpgp.txt
Created November 14, 2017 23:51
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:18739600a6f25ed0f5e553baa5e6006e2b27ea29]
@StefanoAgazzi
StefanoAgazzi / openpgp.txt
Created November 14, 2017 23:51
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:18739600a6f25ed0f5e553baa5e6006e2b27ea29]
@StefanoAgazzi
StefanoAgazzi / openpgp.txt
Created November 14, 2017 23:51
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:18739600a6f25ed0f5e553baa5e6006e2b27ea29]
@StefanoAgazzi
StefanoAgazzi / ks.cfg
Last active July 9, 2017 13:38
kickstart centos 7
#autostep
authconfig --enableshadow --passalgo=sha512
install
#cdrom
url --url="http://http://mirror.centos.org//centos/7/os/x86_64/"
text
lang en_US.UTF-8
keyboard it
timezone Europe/Madrid --isUtc
network --bootproto=dhcp --hostname=os --onboot=true

Keybase proof

I hereby claim:

  • I am stefanoagazzi on github.
  • I am stefanoagazzi (https://keybase.io/stefanoagazzi) on keybase.
  • I have a public key ASB8DkMxHyFCdR3u0xgDsLI1-zF0Xu5_cx6ZLVlF4i0V6go

To claim this, I am signing this object: