Skip to content

Instantly share code, notes, and snippets.

@sergeycherepanov
Last active June 3, 2024 10:30
Show Gist options
  • Save sergeycherepanov/c159e9ddcc965753de86ede976bac2d6 to your computer and use it in GitHub Desktop.
Save sergeycherepanov/c159e9ddcc965753de86ede976bac2d6 to your computer and use it in GitHub Desktop.
# BEGIN ssh-agent
[[ -f /tmp/ssh_agent_default.env ]] && {
eval "$(cat /tmp/ssh_agent_default.env)"
} || {
ssh-agent -s > /tmp/ssh_agent_default.env
eval "$(cat /tmp/ssh_agent_default.env)"
[[ -f ~/.ssh/id_rsa ]] && ssh-add ~/.ssh/id_rsa
}
}
# END ssh-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment