Skip to content

Instantly share code, notes, and snippets.

@agausmann
Created July 28, 2022 03:55
Show Gist options
  • Save agausmann/68af9a15eca39f2ae2603848ade72c89 to your computer and use it in GitHub Desktop.
Save agausmann/68af9a15eca39f2ae2603848ade72c89 to your computer and use it in GitHub Desktop.
Convert SSH Git URLs to HTTPS
for gitdir in $(find $HOME -name .git); do cd "$gitdir/.." 2>/dev/null && ( git remote | grep -q origin ) && (git remote get-url origin | grep -q 'git@github\.com:agausmann' ) && git remote set-url origin "https://github.com/agausmann/$(basename "$(git remote get-url origin)")"; done
@agausmann
Copy link
Author

agausmann commented Jul 28, 2022

Random script that I hacked up to automatically update all my SSH-based origin URLs to HTTPS.

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