Skip to content

Commit

Permalink
Set default git settings
Browse files Browse the repository at this point in the history
Closes #124
  • Loading branch information
lmakarov committed Sep 16, 2019
1 parent 7355039 commit 880cae5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions 7.1/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ git_settings ()
{
# These must be run as the docker user
echo-debug "Configuring git..."
gosu docker git config --global user.email "${GIT_USER_EMAIL}"
gosu docker git config --global user.name "${GIT_USER_NAME}"
# Set default git settings if none have been passed
# See https://github.com/docksal/service-cli/issues/124
gosu docker git config --global user.email "${GIT_USER_EMAIL:-cli@docksal.io}"
gosu docker git config --global user.name "${GIT_USER_NAME:-Docksal CLI}"
}

# Inject a private SSH key if provided
Expand Down
6 changes: 4 additions & 2 deletions 7.2/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ git_settings ()
{
# These must be run as the docker user
echo-debug "Configuring git..."
gosu docker git config --global user.email "${GIT_USER_EMAIL}"
gosu docker git config --global user.name "${GIT_USER_NAME}"
# Set default git settings if none have been passed
# See https://github.com/docksal/service-cli/issues/124
gosu docker git config --global user.email "${GIT_USER_EMAIL:-cli@docksal.io}"
gosu docker git config --global user.name "${GIT_USER_NAME:-Docksal CLI}"
}

# Inject a private SSH key if provided
Expand Down
6 changes: 4 additions & 2 deletions 7.3/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ git_settings ()
{
# These must be run as the docker user
echo-debug "Configuring git..."
gosu docker git config --global user.email "${GIT_USER_EMAIL}"
gosu docker git config --global user.name "${GIT_USER_NAME}"
# Set default git settings if none have been passed
# See https://github.com/docksal/service-cli/issues/124
gosu docker git config --global user.email "${GIT_USER_EMAIL:-cli@docksal.io}"
gosu docker git config --global user.name "${GIT_USER_NAME:-Docksal CLI}"
}

# Inject a private SSH key if provided
Expand Down

0 comments on commit 880cae5

Please sign in to comment.