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

Parse remote host from ssh config #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joaodubas
Copy link

@joaodubas joaodubas commented Feb 19, 2022

In some situations, a user can set a Host rule in ssh config, which defines an alias for a hostname. Such as:

Host example
    Hostname example.com
    User git
    IdentityFile ~/.ssh/gitea

The remote uri will look like: example:username/repository.git.

To avoid problems parsing the remote uri, an ssh module was created to set the proper hostname based on ssh config.

Closes #53

@danielfalk
Copy link

I just tried out this fork because I have the same issue with ssh configurations. It works well.

In some situations the user can set a Host rule in [ssh config][0],
where the Host and Hostname differ.

To avoid problems in this scenario a `ssh` module was create to fix the
hostname configured in the remote uri.

[0]: https://www.man7.org/linux/man-pages/man5/ssh_config.5.html
@G0V1NDS
Copy link

G0V1NDS commented Nov 12, 2023

Any update on this?

stevanmilic pushed a commit to stevanmilic/gitlinker.nvim that referenced this pull request Nov 12, 2023
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

Successfully merging this pull request may close these issues.

Resolve hostname set in ssh config
3 participants