Skip to content

Commit

Permalink
fix(onyxia-init): give user permissions on git's config files
Browse files Browse the repository at this point in the history
  • Loading branch information
avouacr authored Nov 12, 2024
1 parent 02f174e commit 80d7b87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/onyxia-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ if [ "`which git`" != "" ]; then
done
cd $HOME
fi

fi
fi

Expand All @@ -141,6 +140,11 @@ if [ "`which git`" != "" ]; then
if [ -n "$GIT_CREDENTIALS_CACHE_DURATION" ]; then
git config --"$git_config" credential.helper "cache --timeout=$GIT_CREDENTIALS_CACHE_DURATION"
fi

# Fix permissions
[ -d ~/.cache/git ] && chown -R ${USERNAME}:${GROUPNAME} ~/.cache/git
[ -f ~/.gitconfig ] && chown ${USERNAME}:${GROUPNAME} ~/.gitconfig

fi

if command -v R; then
Expand Down

0 comments on commit 80d7b87

Please sign in to comment.