Skip to content

Security and Encrpytion

Lean's edited this page Jan 6, 2026 · 10 revisions

Genereta rsa keys

  • ssh-keygen -t ed25519 -a 100

Git Deploy Keys

Genereta the keys

  • ssh-keygen -t ed25519 -a 100
  • Copy the keys generated in /home/user/.ssh/id_ed25519... to a location that you prefer
  • Go to the git website that you are hosting your repository and find for deploy keys
  • Use the id_ed25519.pub contents in the website, and allow write access
  • Now go to the repository and open your terminal and type:
git remote -v
git remote set-url origin WEBSITEADDRESS:USERNAME/REPOSITORYNAME.git

EXAMPLE:

git remote -v
git remote set-url origin git@github.com:LeandroTheDev/arch_linux.git
OR for enterprises
git remote set-url origin git@github.com:EnterpriseName/repository.git

Project only

  • move the key to the repository .git folder: .git/repository_key
  • git config core.sshCommand "ssh -i .git/repository_key -F /dev/null"
  • git pull

(Global) Custom location for deploy keys

eval $(ssh-agent -s)
ssh-add /path/to/desired/location/id_rsa
  • This needs to be called every system reset, so add it to .bashrc or whatever system you use

Local 2Factor

  • sudo pacman -S keepassxc
  • keepassxc

  • image

  • image

  • Press the left button in the new entry

  • image

  • image

  • Now you can get the code
  • image

Clone this wiki locally