From 26b40e00755127177c76d141c0782398d6050d3e Mon Sep 17 00:00:00 2001 From: Asocia Date: Sun, 2 May 2021 02:09:52 +0300 Subject: [PATCH] TIL: Setting ssh url for pulling or pushing --- git/setting-ssh-url-for-pulling-or-pushing.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 git/setting-ssh-url-for-pulling-or-pushing.md diff --git a/git/setting-ssh-url-for-pulling-or-pushing.md b/git/setting-ssh-url-for-pulling-or-pushing.md new file mode 100644 index 0000000..f1bd98a --- /dev/null +++ b/git/setting-ssh-url-for-pulling-or-pushing.md @@ -0,0 +1,7 @@ +You can clone a repository with ssh and pull/push without having to enter your credentials. If you already cloned it with https and want to change your remote url, do this: +``` +❯ git remote -v +origin https://github.com/Asocia/dotfiles.git (fetch) +origin https://github.com/Asocia/dotfiles.git (push) +❯ git remote set-url origin git@github.com:Asocia/dotfiles.git +```