Skip to content

Instantly share code, notes, and snippets.

@happylinks
Last active January 29, 2024 16:57
Show Gist options
  • Select an option

  • Save happylinks/e2a05fa263c800068cab to your computer and use it in GitHub Desktop.

Select an option

Save happylinks/e2a05fa263c800068cab to your computer and use it in GitHub Desktop.
Fuck my git doesn't work anymore.
Probably you don't have key-forwarding set up correctly or your keys are not set.
Step 1:
Go to terminal, try this command:
ssh-add -l
Do you see the keys loaded?
Yes, continue to step 3.
No, continue to step 2.
Step 2:
Does this file exist? "~/.ssh/id_rsa.pub"
Yes, great.
Do you have this in your ssh config (~/.ssh/config)?
Host *
UseKeychain yes
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa
Yes:
Do `ssh-add -K ~/.ssh/id_rsa` and test it again.
No:
Add it.
No, Damn, create it:
ssh-keygen
and press enter 3x
Step 3:
Ok, key forwarding is not set up right.
Edit ~/.ssh/config
Make sure the server you are trying to access is set up here with the following:
Host <host>
ForwardAgent yes
Or do it the YOLO way:
Host *
ForwardAgent yes
Save the config.
Step 4:
Try again, should work, if not let me know.
P.S. Updates to this file are encouraged.
@murashki

Copy link
Copy Markdown

Everything MS take - becomes full shit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment