File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,9 +142,12 @@ updateLatestVersion() {
142142 echo " ${JSON_DATA} "
143143}
144144
145- # init versions repo for later commiting + pushing the json file to it
146- # thank you https://www.vinaygopinath.me/blog/tech/commit-to-master-branch-on-github-using-travis-ci/
147- git clone " https://${GH_HOST} /${VERSIONS_REPOSITORY} .git"
145+ # init versions repo for later committing + pushing the json file to it
146+ # Use authenticated clone to avoid interactive credential prompts in CI
147+ git clone " https://${GITHUB_USERNAME} :${GITHUB_TOKEN} @${GH_HOST} /${VERSIONS_REPOSITORY} .git" 2> /dev/null || {
148+ echo " Authenticated clone failed; falling back to unauthenticated clone (may fail for private repos)" ;
149+ git clone " https://${GH_HOST} /${VERSIONS_REPOSITORY} .git" ;
150+ }
148151cd " ${REPOSITORY_NAME} " || { echo " '${REPOSITORY_NAME} ' dir not found" ; exit 1; }
149152git config user.email " $( echo " ${GITHUB_USERNAME} " | awk ' {print tolower($0)}' ) -ci@not-real.com"
150153git config user.name " ${GITHUB_USERNAME} CI"
You can’t perform that action at this time.
0 commit comments