Created
May 30, 2017 01:39
-
-
Save nappa32/9db55cf516f2fc6700fa46fc459b5cec to your computer and use it in GitHub Desktop.
change remote for github to ssh from http
This file contains hidden or 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
function githubssh () | |
{ | |
newremote=$(git remote -v|head -1 |sed 's/https:\/\/github.com\//[email protected]:/g'|awk '{print $2}'); | |
git remote set-url origin $newremote | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment