From 595a02383e7be0118807354f34eaa030ff975192 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sat, 25 Feb 2023 11:45:40 -0500 Subject: [PATCH] use multiple env variables to force git https --- modules/common/repositories/dotfiles.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/common/repositories/dotfiles.nix b/modules/common/repositories/dotfiles.nix index c7f03ba..5f7ce27 100644 --- a/modules/common/repositories/dotfiles.nix +++ b/modules/common/repositories/dotfiles.nix @@ -16,7 +16,11 @@ $DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}") # Force HTTPS because anonymous SSH doesn't work - $DRY_RUN_CMD GIT_CONFIG_KEY_0="url.https://github.com/.insteadOf" ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}" + GIT_CONFIG_COUNT=1 \ + GIT_CONFIG_KEY_0="url.https://github.com/.insteadOf" \ + GIT_CONFIG_VALUE_0="git@github.com:" \ + $DRY_RUN_CMD \ + ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}" fi '';