From 9806110979fc4b9039bad9b27b2e72d5259ea57a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 21 Feb 2019 23:46:28 +0100 Subject: [PATCH] Makefile: better "github-ssh" target --- Makefile | 6 ++---- README.md | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4d1ec9fe8..54abe5a97 100644 --- a/Makefile +++ b/Makefile @@ -149,10 +149,8 @@ mrproper: clean # for when you want to use SSH keys with GitHub github-ssh: - sed -i 's#https://github.com/#git@github.com:#' .git/config - git config --file .gitmodules --get-regexp url | while read LINE; do \ - git config `echo $${LINE} | sed 's#https://github.com/#git@github.com:#'` \ - ;done + git config url."git@github.com:".insteadOf "https://github.com/" + git submodule foreach --recursive 'git config url."git@github.com:".insteadOf "https://github.com/"' #- re-builds the Nim compiler (not usually needed, because `make update` does it when necessary) #- allows parallel building with the '+' prefix diff --git a/README.md b/README.md index d469c5a6a..5c42d4c09 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,12 @@ make V=0 # quiet make V=2 test # more verbose than usual ``` +- if you want to use SSH keys with GitHub: + +```bash +make github-ssh +``` + #### Git submodule workflow Working on a dependency: