Skip to content

Commit

Permalink
fix(#586): fix for the authentication part
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Augustin <[email protected]>
  • Loading branch information
AndreasAugustin committed Jan 27, 2025
1 parent 1524677 commit 43e8103
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,12 @@ elif [[ -n "${SOURCE_GH_TOKEN}" ]] || [[ -n "${GITHUB_TOKEN}" ]]; then
info "login to the source git repository"
info "source server url: ${SOURCE_REPO_HOSTNAME}"
gh auth login --git-protocol "https" --hostname "${SOURCE_REPO_HOSTNAME}" --with-token <<< "${SOURCE_GH_TOKEN}"
gh auth status
if [[ -n "${TARGET_GH_TOKEN}" ]]; then
TARGET_REPO_HOSTNAME=$(echo "${GITHUB_SERVER_URL}" | cut -d '/' -f 3)
export TARGET_REPO_HOSTNAME
info "login to the target git repository"
info "target server url: ${TARGET_REPO_HOSTNAME}"
gh auth login --git-protocol "https" --hostname "${TARGET_REPO_HOSTNAME}" --with-token <<< "${TARGET_GH_TOKEN}"
gh auth status
fi
gh auth switch
gh auth status
Expand Down

0 comments on commit 43e8103

Please sign in to comment.