Last active
March 28, 2024 09:03
-
-
Save aharonha/fc2f649f6bd5950d89abc62734aa4a19 to your computer and use it in GitHub Desktop.
Changing a remote repository's URL to ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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