Skip to content

Instantly share code, notes, and snippets.

@aharonha
Last active March 28, 2024 09:03
Show Gist options
  • Save aharonha/fc2f649f6bd5950d89abc62734aa4a19 to your computer and use it in GitHub Desktop.
Save aharonha/fc2f649f6bd5950d89abc62734aa4a19 to your computer and use it in GitHub Desktop.
Changing a remote repository's URL to ssh
git remote -v | grep http | grep push | awk -F// ' { print $2 } ' | awk ' { print "git@"$1 } ' | sed 's/\//:/' | xargs git remote set-url origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment