Change nixos remote
This commit is contained in:
@@ -63,14 +63,14 @@ curl -X POST \
|
||||
|
||||
HTTP_REPLACE="s/https:\/\/labs\.scarif\.space\//git@labs.scarif.space:/"
|
||||
|
||||
# for dir in $(ls "$HOME/.local/src"); do
|
||||
# dir="$HOME/.local/src/$dir"
|
||||
# if [ -d $dir ]; then
|
||||
# cd "$dir"
|
||||
# SSH_URL=$(git remote get-url origin | sed "$HTTP_REPLACE")
|
||||
# git remote set-url origin "$SSH_URL"
|
||||
# fi
|
||||
# done
|
||||
for dir in "$HOME/.local/nixos"; do
|
||||
dir="$HOME/.local/src/$dir"
|
||||
if [ -d $dir ]; then
|
||||
cd "$dir"
|
||||
SSH_URL=$(git remote get-url origin | sed "$HTTP_REPLACE")
|
||||
git remote set-url origin "$SSH_URL"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Replacing remote URL to use SSH key"
|
||||
DOTFILES_SSH_URL=$(git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote get-url origin | sed "$HTTP_REPLACE")
|
||||
|
||||
Reference in New Issue
Block a user