make release-binaries fails on macOS with a VCS error. #4881
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-priority
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
/kind bug
/triage accept
What steps did you take and what happened:
Running
make release
, or more specifically,make release-binaries
during the release process from a macOS machine (Intel or Apple silicon) will result in the following error:This is happening because the directory name inside the container (
/workspace
) differs from the directory name on the host and in the checkout's.git
repository.What did you expect to happen:
make release
succeeds without git vcs errors.Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
This is fixed by calling
git config safe.directory /workspace
, but might take some testing to figure out exactly where that needs to go.Testing has shown that mounting the
.git/config
file inside the container will work, too, as long as it's in a global or system-wide location that git recognizes, not within the directory that's untrusted.Also, we do not want to follow the advice of the message to set
-buildvcs=false
, since that disables the version information being inserted into the binary at Go build time.Environment:
/etc/os-release
): macOSDuring v2.4.1 release process
The text was updated successfully, but these errors were encountered: