Skip to content

Instantly share code, notes, and snippets.

@perseoq
Last active August 19, 2025 05:26
Show Gist options
  • Select an option

  • Save perseoq/914abd7f4aa6a289024548275faa000f to your computer and use it in GitHub Desktop.

Select an option

Save perseoq/914abd7f4aa6a289024548275faa000f to your computer and use it in GitHub Desktop.
ssh para gitlab o github

Habilitar git

git config --global credential.helper store
git config --global credential.github.com.useHttpPath true

Generar llave

ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_usuario1 -C "usuario1@email.com"

Importar datos y llave a ~/.ssh/config

# Cuenta principal (usuario1)
Host github.com-usuario1
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519_usuario1

Clonar repositorio

git clone git@github.com-usuario1:usuario1/repo1.git

Poner url mediante ssh si ya lo habias clonado con https

git remote set-url origin git@github.com:usuario1/repo1.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment