Skip to content
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

Download tools from Github enterprise #5447

Open
ldoin opened this issue Mar 27, 2023 · 0 comments
Open

Download tools from Github enterprise #5447

ldoin opened this issue Mar 27, 2023 · 0 comments

Comments

@ldoin
Copy link

ldoin commented Mar 27, 2023

#4254 added support for private repositories hosted on github.com but I was not able to get something working with github Enterprise.

I tried using private_hosts config:

{
    "last_update":  "2023-03-27T22:29:52.5918248+02:00",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop",
    "scoop_branch":  "master",
    "private_hosts": [
        {
            "match":  "https://github.saobby.my.eu.orgpany.com/*",
            "headers": "Authorization=token ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        }
    ]
}

Accept header need to be set to application/octet-stream So it did nother attempt with

{
    "last_update":  "2023-03-27T22:29:52.5918248+02:00",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop",
    "scoop_branch":  "master",
    "private_hosts": [
        {
            "match":  "https://github.saobby.my.eu.orgpany.com/*",
            "headers": "Authorization=token ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nAccept=application/octet-stream"
        }
    ]
}

I got an error message saying The 'Accept' header must be modified using the appropriate property or method.

Looking at #4254 I've noticed that Accept header was handled in a particular way. Also there is some logic to retrieve asset url from release url that is only applied if url matches github.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant