lukaszlenart opened a new pull request, #313:
URL: https://github.com/apache/struts-site/pull/313

   Follow-up to #309/#310/#312. The build now reaches the publish stage but 
fails there:
   
   ```
   + git fetch asf
    * [new branch]  main -> asf/main
   + git checkout main
   fatal: 'main' matched multiple (2) remote tracking branches
   ```
   
   ## Root cause
   The Pipeline-from-SCM checkout populates `origin/*` (including 
`origin/main`). The publish stage then adds an `asf` remote pointing at the 
same gitbox repo, giving `asf/main` too. With no local `main` branch, `git 
checkout main` is a DWIM guess across remotes — and since it matches both 
`origin/main` and `asf/main`, git refuses.
   
   (The legacy site `Jenkinsfile` avoids this because its multibranch checkout 
only fetches the single PR branch, so no `origin/asf-staging` exists to collide 
with `asf/asf-staging`.)
   
   ## Fix
   Pin the intended remote explicitly:
   
   ```
   git checkout -B main asf/main
   ```
   
   This creates/points local `main` at `asf/main` unambiguously, and makes the 
subsequent `git pull asf main` redundant (dropped).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to