Added Git Code to Make a Safe Directory
This commit is contained in:
parent
54bea5c6b0
commit
b9d1c8d2e3
@ -5,6 +5,9 @@ process_repo() {
|
||||
FULL_REPO_URL=$1
|
||||
DESTINATION=$2
|
||||
|
||||
# Ensure The Repo is marked as Safe by Git
|
||||
git config --global --add safe.directory /root/Repo_Cache/docs
|
||||
|
||||
# Extract the URL without credentials for logging and notifications
|
||||
CLEAN_REPO_URL=$(echo "$FULL_REPO_URL" | sed 's/https:\/\/[^@]*@/https:\/\//')
|
||||
|
||||
@ -34,6 +37,7 @@ process_repo() {
|
||||
|
||||
# Main loop
|
||||
while true; do
|
||||
|
||||
# Iterate over each environment variable matching 'REPO_[0-9]+'
|
||||
env | grep '^REPO_[0-9]\+=' | while IFS='=' read -r name value; do
|
||||
# Split the value by comma and read into separate variables
|
||||
|
Loading…
x
Reference in New Issue
Block a user