You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using neovim on a corporate intranet without general internet access.
There is a mirror site which provides access to GitHub projects and releases.
My problem is that Mason cannot download it's registry.
I am configuring mason to download assets from my corporate mirror like this:
require('mason').setup({
log_level=vim.log.levels.DEBUG,
providers= {
-- omitting registry-api provider, because it connects to https://api.mason-registry.dev/api/github/mason-org/mason-registry/releases/latest"mason.providers.client",
},
github= {
download_url_template='https://proxy.corporate.com/generic-github-releases/%s/releases/download/%s/%s',
}
})
When I run :Mason, I get this message:
Uninstalled registries
Packages from the following registries are unavailable. Press C to install.
- github.com/mason-org/mason-registry [uninstalled]
- github.com/mason-org/mason-registry [uninstalled]
- github.com/mason-org/mason-registry [uninstalled]
Registry installation failed with the following error:
GitHubRegistrySource(repo=mason-org/mason-registry) failed to install: Failed to fetch latest registry version from GitHub API.
The mason.log file shows this:
[DEBUG Thu 11 May 2023 12:02:41 PM EDT] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="wget", spawn_opts={
args = { "--header=Accept: application/vnd.github.v3+json; q=1.0, application/json; q=0.8", "--header=User-Agent: mason.nvim (+https://github.com/williamboman/mason.nvim)", "-nv", "-o", "/dev/null", "-O", "-", "--method=GET", "https://api.github.com/repos/mason-org/mason-registry/releases/latest" }
}
[DEBUG Thu 11 May 2023 12:02:41 PM EDT] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 1280754
[DEBUG Thu 11 May 2023 12:02:41 PM EDT] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=1280754 exited with exit_code=4, signal=0
[ERROR Thu 11 May 2023 12:02:41 PM EDT] ...e/nvim/lazy/mason.nvim/lua/mason-core/providers/init.lua:75: Provider "github" "get_latest_release" failed: spawn: wget failed with exit code 4 and signal 0.
[ERROR Thu 11 May 2023 12:02:41 PM EDT] ...e/nvim/lazy/mason.nvim/lua/mason-core/providers/init.lua:86: No provider implementation succeeded for github.get_latest_release
[ERROR Thu 11 May 2023 12:02:41 PM EDT] ...im/lazy/mason.nvim/lua/mason-registry/sources/github.lua:181: Failed to install registry GitHubRegistrySource(repo=mason-org/mason-registry). "Failed to fetch latest registry version from GitHub API."
The solution is probably that I need to configure the registries during setup(), something like this:
However I can't get Mason to accept a specific URL for the registry.
If I prepend 'github:' to the url above, then Mason adds a GitHub url onto the front before downloading.
Prepending 'lua:' doesn't help either.
These are the only prefixes allowed by lua/mason-registry/sources/init.lua, anything else causes a 'Malformed registry id' error.
How can I configure Mason to download registries from a mirror site?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using neovim on a corporate intranet without general internet access.
There is a mirror site which provides access to GitHub projects and releases.
My problem is that Mason cannot download it's registry.
I am configuring mason to download assets from my corporate mirror like this:
When I run
:Mason, I get this message:The mason.log file shows this:
The solution is probably that I need to configure the registries during
setup(), something like this:However I can't get Mason to accept a specific URL for the registry.
If I prepend 'github:' to the url above, then Mason adds a GitHub url onto the front before downloading.
Prepending 'lua:' doesn't help either.
These are the only prefixes allowed by
lua/mason-registry/sources/init.lua, anything else causes a 'Malformed registry id' error.How can I configure Mason to download registries from a mirror site?
Beta Was this translation helpful? Give feedback.
All reactions