Skip to content

🐛 Ensure that if a fetch fails it retries with authentication in the same way as clone#143

Merged
joshjennings98 merged 4 commits into
mainfrom
fetch-with-auth
Jun 1, 2026
Merged

🐛 Ensure that if a fetch fails it retries with authentication in the same way as clone#143
joshjennings98 merged 4 commits into
mainfrom
fetch-with-auth

Conversation

@joshjennings98
Copy link
Copy Markdown
Contributor

Description

Problem:

  • cd-assert-news creates a temporary clone of the repo
  • that clone later does a git fetch
  • the fetch used the normal remote URL without authentication
  • in a private repo, that failed with GitHub credential errors

Fix:

  • it tries a normal fetch first
  • if that fails, it retries using the authenticated GitHub URL built from GIT_TOKEN

This is the same way htat clone() works.

Test Coverage

  • This change is covered by existing or additional automated tests.
  • Manual testing has been performed (and evidence provided) as automated testing was not feasible.
  • Additional tests are not required for this change (e.g. documentation update).

@joshjennings98 joshjennings98 requested a review from a team as a code owner June 1, 2026 13:00
Comment thread continuous_delivery_scripts/utils/git_helpers.py Outdated
@joshjennings98 joshjennings98 merged commit 3cb7eef into main Jun 1, 2026
15 checks passed
@joshjennings98 joshjennings98 deleted the fetch-with-auth branch June 1, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants