Closed eproxus closed 6 days ago
What is the output of git remote -v
in the repository?
Hmm, it actually is:
$ git remote -v
origin github-work:org/repo.git (fetch)
origin github-work:org/repo.git (push)
Which is because I have the following in my ~/.gitconfig
:
[url "github-work:org/"]
insteadOf = git@github.com:org/
If I remove that it works. The reason I have that config is because I have configured specific SSH settings for the github-work
host in ~/.ssh/config
.
I have the exact same issue
Ah, didn't realize there was an issue ranking. There were a few 👀 on a similar discussion here https://github.com/zed-industries/zed/discussions/10215
I believe ssh:// urls were fixed by:
It's not really practical for Zed to attempt to resolve a git remote which is re-written by .gitconfig
to a fake host alias specified in ~/.ssh/config
to detect whether the end host name is github.com.
I'm happy to revisit if you have a suggested method for how this could be implemented, but for now I'm going to close it as unactionable. Thanks for reporting.
I'm also facing the same issue due to the same reason as @eproxus. @notpeter while I understand that currently it isn't supported or deemed as important, shouldn't this be implemented sometime in the future? I'm sure many people would have custom ssh configs for work repos. But if it is highly impractical for Zed to parse the ssh config to be able to resolve custom host names, what can we change in our configs to be able to get the same custom ssh config functionality AND use Zed's permalink feature?
Would it be too difficult to add a custom mapping of hostnames in the settings file for such a scenario that Zed can use to replace custom hosts with the actual underlying host? It can be a permalink specific setting, or a git related setting. Whichever results in a better and more practical implementation.
I've managed to solve it by removing the SSH host alias, so from my side the issue can be closed. For what it's worth, I personally don't think it is that strange to not require an editor to be aware of this kind of host mapping hack.
Check for existing issues
Describe the bug / provide steps to reproduce it
Open a Git repository with the following
.git/config
configuration:editor: open permalink to line
from the command paletteThe same happens with
ssh://github.com/org/repo.git
.Environment
Zed: v0.139.3 (Zed) OS: macOS 14.5.0 Memory: 64 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.No response