Skip to content

Commit fafe7f8

Browse files
authored
Revise private repository options for GoLang
Updated options for handling private Go repositories in CodeQL builds.
1 parent f8288fd commit fafe7f8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

troubleshooting/codeql-builds/compiled-languages-go.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
Autobuild fails with error "Some packages could not be found"
44

5-
There are two options when it comes to private repositories:
6-
7-
- Set-up the Go environment within the Actions workflow (not vendoring then)
5+
There are a few options when it comes to private repositories:
6+
- Default Setup [can take advantage of Global Private Registry configuration](https://github.blog/changelog/2025-06-10-private-registries-for-go-codeql-scans/) via `GOPROXY`
7+
- Advanced setup via yaml configuration can initialize the Go environment within the Actions workflow
88
- Vendor the dependencies
99

10+
### Advanced Setup
11+
1012
Setting up the Go environment can be done by adding a Actions step to update the [Go settings](https://go.dev/ref/mod#private-modules) pointing them to use a [GitHub Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with the corresponding access to the private repository.
1113
The example below shows how this can be done using a single step before the CodeQL Initize step - storing the GitHub PAT in an Actions Secret.
1214

0 commit comments

Comments
 (0)