Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cannot clone luasnip with submodules from mirror site without GitHub access #911

Closed
gongfarmer opened this issue Jun 6, 2023 · 1 comment

Comments

@gongfarmer
Copy link
Contributor

I am running neovim at a large company within a secure development environment.
There is no access to https://github.com/, however there is an internal mirror site with a different URL that provides access to GitHub projects.

The lazy.nvim package manager gets plugins from our local mirror with this neovim configuration:

local opts = {
  git = {
    url_format = 'https://repomirror.corporate.com/github/%s.git',
  }
}
require('lazy').setup('plugins', opts)

This does not work for the luasnip plugin. This plugin defines a submodule with a GitHub URL that is not reachable:

$ cat .gitmodules
[submodule "deps/jsregexp"]
	path = deps/jsregexp
	url = https://github.com/kmarius/jsregexp/

This has an easy solution: Use a relative path for the url in .gitmodules.

Here is what the problem looks like (using plain git for clarity, but lazy.nvim uses this exact command internally for its clones:)

$ git clone --filter=blob:none --recurse-submodules --origin=origin  --progress  https://repomirror.corporate.com/github/L3MON4D3/LuaSnip.git
Cloning into 'LuaSnip'...
Fetching objects: 11498, done.
Submodule 'deps/jsregexp' (https://github.com/kmarius/jsregexp/) registered for path 'deps/jsregexp'
Cloning into '/home/bob/LuaSnip/deps/jsregexp'...
fatal: unable to access 'https://github.com/kmarius/jsregexp/': gnutls_handshake() failed: Error in the pull function.
fatal: clone of 'https://github.com/kmarius/jsregexp/' into submodule path '/home/bob/LuaSnip/deps/jsregexp' failed
Failed to clone 'deps/jsregexp'. Retry scheduled
Cloning into '/usr/local/ldr/LuaSnip/deps/jsregexp'...
fatal: unable to access 'https://github.com/kmarius/jsregexp/': gnutls_handshake() failed: Error in the pull function.
fatal: clone of 'https://github.com/kmarius/jsregexp/' into submodule path '/home/bob/LuaSnip/deps/jsregexp' failed
Failed to clone 'deps/jsregexp' a second time, aborting
@L3MON4D3
Copy link
Owner

L3MON4D3 commented Jun 7, 2023

(Closed with #912)

@L3MON4D3 L3MON4D3 closed this as completed Jun 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants