Support Registries and packages hosted at GitHub Enterprise Servers.
Why is the feature needed?
Some users use GitHub Enterprise Servers and host internal tools.
It would be nice that they can host private Registries and distribute their tools with aqua.
Workaround
No response
Example Code
registry.yaml
Add .hosts and .packages[].host.
hosts:
- name: example
github_enterprise:
base_url: htttps://example.com
upload_url: htttps://example.com
packages:
- type: github_release
host: example
repo_owner: aquaproj
repo_name: example
WithEnterpriseURLs returns a copy of the client configured to use the provided base and upload URLs. If the base URL does not have the suffix "/api/v3/", it will be added automatically. If the upload URL does not have the suffix "/api/uploads", it will be added automatically.
Note that WithEnterpriseURLs is a convenience helper only; its behavior is equivalent to setting the BaseURL and UploadURL fields.
Another important thing is that by default, the GitHub Enterprise URL format should be http(s)://[hostname]/api/v3/ or you will always receive the 406 status code. The upload URL format should be http(s)://[hostname]/api/uploads/.
Feature Overview
Support Registries and packages hosted at GitHub Enterprise Servers.
Why is the feature needed?
Some users use GitHub Enterprise Servers and host internal tools. It would be nice that they can host private Registries and distribute their tools with aqua.
Workaround
No response
Example Code
registry.yaml
Add
.hosts
and.packages[].host
.aqua.yaml
Add
.hosts
and.registries[].host
.Note
This issue is based on the discussion https://github.com/orgs/aquaproj/discussions/2726#discussioncomment-8713641 .
https://pkg.go.dev/github.com/google/go-github/v60/github#Client.WithEnterpriseURLs