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
Is your feature request related to a problem? Please describe.
Usually, I configure access to git hosts through ssh config. This makes it easier to set different keys for my work and personal projects, as well as it simplifies setup remote hosts.
However, the current parser expects remote uri to be set as https://<hostname>/<user>/<repo>.git, or ssh://git@<hostname>/<user>/<repo>.git, or git@<hostname>:<user>/<repo>.git, and in my case, the remote uri is set as <alias>:<user>/<repo>.git, which causes the following error:
E5108: Error executing lua ...e/pack/packer/start/gitlinker.nvim/lua/gitlinker/git.lua:86: attempt to index local 'uri' (a nil value)
stack traceback:
...e/pack/packer/start/gitlinker.nvim/lua/gitlinker/git.lua:86: in function 'strip_uri'
...e/pack/packer/start/gitlinker.nvim/lua/gitlinker/git.lua:140: in function 'parse_uri'
...e/pack/packer/start/gitlinker.nvim/lua/gitlinker/git.lua:219: in function 'get_repo_data'
.../site/pack/packer/start/gitlinker.nvim/lua/gitlinker.lua:55: in function 'get_buf_range_url_data'
.../site/pack/packer/start/gitlinker.nvim/lua/gitlinker.lua:115: in function 'get_buf_range_url'
[string ":lua"]:1: in main chunk
Describe the solution you'd like
It's possible to resolve the hostname using ssh -G <alias>, which returns a parseable result:
user git
hostname <hostname>
port <port>
...
Describe alternatives you've considered
I changed my host alias to match the hostname without success.
gitlinker could have a hook for the parser, making it possible to override the default implementation.
Additional context
--
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Usually, I configure access to git hosts through ssh config. This makes it easier to set different keys for my work and personal projects, as well as it simplifies setup remote hosts.
However, the current parser expects remote uri to be set as
https://<hostname>/<user>/<repo>.git
, orssh://git@<hostname>/<user>/<repo>.git
, orgit@<hostname>:<user>/<repo>.git
, and in my case, the remote uri is set as<alias>:<user>/<repo>.git
, which causes the following error:Describe the solution you'd like
It's possible to resolve the hostname using
ssh -G <alias>
, which returns a parseable result:Describe alternatives you've considered
gitlinker
could have a hook for the parser, making it possible to override the default implementation.Additional context
--
The text was updated successfully, but these errors were encountered: