zed
zed copied to clipboard
Git: "Failed to check metadata of Zed executable path for use in askpass" error
Summary
Trying to pull from Github I got "Failed to check metadata of Zed executable path for use in askpass" error.
Description
- Having something to pull from upstream, in my case to Github, so not sure if it's related, or only
gitrelated. - Press Ctrl + Shift + P to execute a command
- Execute the command
git: pull
Actual Behavior:
First you see the error pop-up "git pull failed. View Log". Clicking the "View Log" you see a more detailed error, saying "Failed to check metadata of Zed executable path for use in askpass" in a "Output from git log" tab opened.
Expected Behavior:
If I execute from a CLI git pull, it just works, even if it's the Zed's terminal.
Zed Version and System Specs
Zed: v0.184.8 (Zed) OS: Linux X11 ubuntu 20.04 Memory: 31 GiB Architecture: x86_64 GPU: NVIDIA GeForce GTX 1650 with Max-Q Design || NVIDIA || 535.183.01
Also have Git 2.25.1.
Experiencing the same issue on Fedora 42 with Zed: v0.184.9, funnily enough I committed without issues then started getting the same error message.
I am getting the same error when trying to push changes through the git panel.
Zed: v0.184.8 (Zed) OS: Linux X11 Ubuntu 22.04 Git: 2.43.0
Yikes this is definitely my fault. Would you mind providing me with the path for the Zed bin on your machine? Feel free to replace any sensitive path segments with fillers. It would also be useful if you provided the output of stat on the path, as this error will only happen if
- The path contains invalid unicode so when converted to valid unicode is no longer a valid path
stat(2)on the path fails- Zed (by extension user) does not have permission to
stat(2)the path
so something like:
ZED_PATH=$(which zed) # ensuring `which zed` returns path to zed binary not zed cli
echo "${ZED_PATH}"
stat "${ZED_PATH}"
Also get this when attempting to connect to a remote ssh server (in my case a devcontainer)
- https://github.com/zed-industries/zed/issues/11473#issuecomment-2862153949
- https://gist.github.com/airtonix/2a4cf1fea26f82ff439690ec24c3ef79
~
x which zed
~/.local/bin/zed
~
> stat "$(which zed)"
File: /home/me/.local/bin/zed -> /home/me/local/zed.app/bin/zed
Size: 37 Blocks: 8 IO Block: 4096 symbolic link
Device: 0,36 Inode: 48523152 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 1000/me) Gid: ( 1000/me)
Context: unconfined_u:object_r:gconf_home_t:s0
Access: 2025-05-09 08:15:44.553496272 +0930
Modify: 2025-01-29 14:44:39.763077192 +1030
Change: 2025-01-29 14:44:39.763077192 +1030
Birth: 2025-01-29 14:44:39.763077192 +1030
~
> ls -al ~/local
ls: cannot access '/home/me/local': No such file or directory
~
> ls -al ~/.local/bin/zed
lrwxrwxrwx. 1 me me 37 Jan 29 14:44 /home/me/.local/bin/zed -> /home/me/.local/zed.app/bin/zed
looks like someone made some assumptions about how the app should be compiled/installed?
Looks like the issue was fixed, now I have Zed 0.183.13 and it works. The only difference maybe is that is not that I've a newer version, but also I did the upgrade going to "Zed" menu and then "Check for Updates", while the first version that failed I just downloaded the .tar.gz bundle and unpacked it to make it work.
I'm not sure what the issue was, the original reported error message could only occur if stat(2) failed on the executable path which is confusing to say the least. I've tried with symlinks, spaces in the path name, etc and it all passes just fine.
That being said, because the check was only intended to surface a better error message than ssh will if the path isn't executable and askpass fails (I assume ssh gives an obscure error on purpose to avoid leaking information to malicious actors) I've opted to just remove it.
If any of you get "authentication failed" errors once my patch goes live with a valid remote, etc, then it's likely the check was catching something important and I'd appreciate if you @-mentioned me in this issue or create a new issue so we can figure it out