-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(golangBuild): BOM creation failed with private Go modules #4460
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realised it's maybe not a great idea to use the host URLs in git config
instead of the specific repository URLs. Because it could potentially lead to confusion in other parts of the step when git is needed.
But if we do go ahead with the host URLs, maybe they can be parsed from the privateModules
parameter instead of iterating over go.mod
?
/it-go |
/it-go |
Kudos, SonarCloud Quality Gate passed! |
/it-go |
* quickly try to only specify base private repo URLs with git config * fix the test * refactoring of private modules * test * fix test * fix url * typo * Adding gitConfiguration * typo * unit test * unit test --------- Co-authored-by: I557621 <[email protected]> Co-authored-by: aibaend1 <[email protected]> Co-authored-by: asadu <[email protected]>
CycloneDX uses a
go list
command which needs git to authenticate to the base URL of private modules.Since
git config
'sinsteadOf
uses a base URL, I think we can replace thegit config
commands that we do in this step for all individual private modules with just the base URLs.Since GOPRIVATE can be in glob format, we can't use the
privateModules
parameter directly to determine the base URLs.Changes