client icon indicating copy to clipboard operation
client copied to clipboard

git: 'remote-keybase' is not a git command

Open programehr opened this issue 6 years ago • 30 comments

I ran into this error: "git: 'remote-keybase' is not a git command. See 'git --help'." when trying to pull/push/clone. I'm using version 2.12.2-20181218091941+29273f4110

programehr avatar Dec 19 '18 18:12 programehr

@programehr can you please share more info about what operation system you're running on, and what version/distribution of git you're using? And running keybase log send and posting the resulting log ID here would be useful as well.

Normally this is an issue with your local git environment, which is not properly looking for remote protocol helpers.

strib avatar Dec 19 '18 19:12 strib

I'm using git version 2.18.0.windows.1 on Windows 10. I tried keybase log send several times and got an API network error avery time. By the way, I didn't have a problem with this until today. I updated keybase today, but am not sure if it has to do with the problem. Thanks.

programehr avatar Dec 19 '18 20:12 programehr

Are you using cygwin or some other non-standard terminal when you're running the commands?

strib avatar Dec 19 '18 20:12 strib

I use MinGW.

programehr avatar Dec 19 '18 20:12 programehr

Not familiar with that one. Does git-remote-keybase.exe exist in an executable location?

strib avatar Dec 19 '18 20:12 strib

It's in my AppData\Local\Keybase folder.

programehr avatar Dec 19 '18 21:12 programehr

That's the same location as your keybase.exe, which I assume works fine in this shell.

In the past, there was a user who fixed a similar issue by restarting bash (or closing the terminal and re-opening a new one). Maybe try that?

If that doesn't work, you can try copying git-remote-keybase.exe into your git's git-core directory, though that really shouldn't be necessary.

strib avatar Dec 19 '18 21:12 strib

Restarting the terminal didn't work, but... copying into git-core did! Thanks!

programehr avatar Dec 19 '18 21:12 programehr

Ok, thanks for the update. That's not really a great solution since it won't get updated when we put out new releases. You might want to do some more investigation to figure out why git isn't able to find remote helpers that exist in your path.

strib avatar Dec 19 '18 21:12 strib

Restarting the terminal didn't work, but... copying into git-core did! Thanks!

programehr avatar Dec 19 '18 21:12 programehr

I needed to symlink git-remote-keybase.exec e.g. (using relative path from $HOME) ln -s .\AppData\Local\Keybase\git-remote-keybase.exe .\scoop\apps\git\current\mingw64\libexec\git-core\, which worked. A default Keybase install on Windows does not make this helper available.

ghost avatar Jan 06 '19 21:01 ghost

Does MinGW not automatically pick up changes to the current user's Windows path when it starts? If not, the only choice is to manually change the MinGW shell configuration for every Windows program that depends on modifying the path after it is installed, such as Keybase.

zanderz avatar Jan 07 '19 17:01 zanderz

I have a similar issue on Windows 10. Everything work perfectly when I use command line in git bash but I have the "git: 'remote-keybase' is not a git command." error with GitHub Desktop when I try to fetch. Copying git-remote-keybase.exe into the git-core directory work. But it's not a great solution because the file won't get updated (cf @strib previous message). Thanks!

nnjeremy avatar Jan 24 '19 22:01 nnjeremy

In Windows 10 I created a symbolic link and it worked. That will work even when keybase gets updated.

cd "C:\Program Files\Git\cmd mklink git-remote-keybase.exe C:\Users\myuser\AppData\Local\Keybase\git-remote-keybase.exe

jucie avatar Jun 13 '19 14:06 jucie

run from an elevated "Command Prompt"/cmd.exe, not Powershell.

marchage avatar Jul 05 '19 11:07 marchage

Confirmed what @jucie and @marchage mentioned.

run cd "C:\Program Files\Git\cmd mklink git-remote-keybase.exe C:\users\<myuser>\AppData\Local\Keybase\git-remote-keybase.exe where <myuser> is your user profile name. Don't copy and paste the code like i did and not change the profile name... it doesn't work. 😛

charltonstanley avatar Sep 14 '19 03:09 charltonstanley

FWIW, I had this problem. It was simply because it was a brand new install of GitHub desktop that I was trying to clone the Keybased repo from. I restarted GitHub and it worked fine. I presume because it picked up the PATH environment variable that pointed to the keybase directory.

WonkySoft avatar Apr 29 '20 16:04 WonkySoft

I just ran into this issue on a fresh install of Git 2.30.0 on Windows 10. I was able to fix it with: export PATH=$PATH:/c/Users/<username>/AppData/Local/Keybase It seems that the path used by Git Bash is completely independent of the path that Windows's Command Prompt uses. To keep it working permanently, I added the above to my ~/.profile

scotthammack avatar Dec 30 '20 00:12 scotthammack

Hey sorry I've just run into this on a MacBook Pro, which I was just given for work I've been using Keybase Git since forever but never on a MacBook. Anyway I'm trying to clone my main repo and getting nowhere.

I saw this q from @strib

Does git-remote-keybase.exe exist in an executable location?

I don't know how to check this on a MacBook. Where the heck is the directory on these things? I did a search in Finder but that got nothing.

Sorry I'm so basic here. I've been a Windows user since the dawn of time. So much seems to be hidden on MacBooks.

BradyDale avatar May 20 '21 16:05 BradyDale

Oh I think I fixed this Such a dumb problem

Do not install via the App Store if you want to use Git with Keybase, friends

I had installed Keybase on the MacBook through the App Store and then a friend suggested that I should uninstall it and reinstall via direct download from the Keybase site. This seems to have worked.

BradyDale avatar May 20 '21 17:05 BradyDale

@BradyDale I had the same problem as you when installing Keybase on my MacBook Pro work computer. However, I installed Keybase directly from the Keybase website. I noticed that this error might occur when you install Git after installing Keybase. The fix for me was to uninstall Keybase and reinstall it from the same dmg file.

dizzzzy avatar May 21 '21 19:05 dizzzzy

I'm having this issue on Arch Linux (Manjaro). I used pacman to install the latest version of keybase using the command pacman -S keybase which successfully installed version 5.8.1. I added /usr/bin/keybase to my PATH and it didn't seem to fix the problem.

marshmallow-codes avatar Oct 24 '21 16:10 marshmallow-codes

I ended up uninstalling it and installing the GUI with yay -S keybase-bin and now when I run keybase and try to clone repos I don't run into this issue. (Imagine following instructions and having it work :sweat_smile: )

marshmallow-codes avatar Oct 25 '21 15:10 marshmallow-codes

I had this same issue on a Mac using cron. Here is how I managed it:

**      **      **      **      **      sleep 15 && PATH=$PATH:/usr/local/bin /Users/eduardolisboa/.sh/tmgit.sh push-remote >> /Users/eduardolisboa/.tmgit.log 2>> /Users/eduardolisboa/.tmgit.err || keybase log send --no-confirm

Basically, I appended the path /usr/local/bin to $PATH variable, so it finds git-remote-keybase when my script runs a git push via cron.

If you ever got curious about it, take a look at https://github.com/elisboa/linux-time-machine.sh

elisboa avatar Jan 08 '22 03:01 elisboa

I ran into the same issue once I upgraded to macos ventura (beta). Screen Shot 2022-06-09 at 3 38 28 AM

This was what I found in /usr/local/bin even though homebrew is supposed to use /opt/homebrew on arm machines. Screen Shot 2022-06-09 at 3 38 07 AM

After the last command (moving all the entries in /usr/local/bin into /opt/homebrew/bin, everything started working again!

vraravam avatar Jun 08 '22 22:06 vraravam

When installing via homebrew I am getting:

2022-09-16T13:26:52.321240+12:00 ▶ [INFO keybase install_darwin.go:673] 001 Checking /usr/local/bin/keybase (/Applications/Keybase.app/Contents/SharedSupport/bin/keybase)
2022-09-16T13:26:52.321441+12:00 ▶ [INFO keybase install_darwin.go:701] 002 Linking /usr/local/bin/keybase to /Applications/Keybase.app/Contents/SharedSupport/bin/keybase
2022-09-16T13:26:52.321506+12:00 ▶ [ERRO keybase install_darwin.go:676] 003 Command line not installed properly (symlink /Applications/Keybase.app/Contents/SharedSupport/bin/keybase /usr/local/bin/keybase: permission denied)
2022-09-16T13:26:52.321695+12:00 ▶ [ERRO keybase install_darwin.go:498] 004 Error installing CLI: symlink /Applications/Keybase.app/Contents/SharedSupport/bin/keybase /usr/local/bin/keybase: permission denied

steinybot avatar Sep 16 '22 01:09 steinybot

@steinybot

When installing via homebrew I am getting:

2022-09-16T13:26:52.321240+12:00 ▶ [INFO keybase install_darwin.go:673] 001 Checking /usr/local/bin/keybase (/Applications/Keybase.app/Contents/SharedSupport/bin/keybase)
2022-09-16T13:26:52.321441+12:00 ▶ [INFO keybase install_darwin.go:701] 002 Linking /usr/local/bin/keybase to /Applications/Keybase.app/Contents/SharedSupport/bin/keybase
2022-09-16T13:26:52.321506+12:00 ▶ [ERRO keybase install_darwin.go:676] 003 Command line not installed properly (symlink /Applications/Keybase.app/Contents/SharedSupport/bin/keybase /usr/local/bin/keybase: permission denied)
2022-09-16T13:26:52.321695+12:00 ▶ [ERRO keybase install_darwin.go:498] 004 Error installing CLI: symlink /Applications/Keybase.app/Contents/SharedSupport/bin/keybase /usr/local/bin/keybase: permission denied

Me too, using Homebrew on a MacBook Air M1. Did you ever find a solution? Someone else has dug deeper into this, registering it as a bug with Homebrew, but if you read until the end it seems the problem is indeed with Keybase. Here is the link: https://bytemeta.vip/repo/Homebrew/homebrew-cask/issues/124628

aholland avatar Apr 16 '23 07:04 aholland

@aholland I managed to install thanks to this link you just posted. Basically, I just did:

sudo chmod 1777 /usr/local/bin
brew reinstall --force --verbose --debug keybase
sudo chmod 0755 /usr/local/bin

I know it's kind of wrong (and ugly, at least) to raise permissions on /usr/local/bin, but that's a workraround that worked for me. You can lower the permissions after the install, as I showed in the last command above.

elisboa avatar Apr 17 '23 11:04 elisboa