1

I'm having trouble updating the submodules I use for my vim configuration despite everything else working from a GitHub perspective.

I have already followed github's "generating SSH keys" as well as "adding SSH keys to github" article multiple times and have re-added my SSH key multiple times. I have tried the ed protocol, as well as the RSA and neither seems to work.

Strangely enough, all other tests for whether or not I'm connected work. I'm able to git clone a raw repository without a problem, even private repositories using ssh links.

I can also use the ssh -T git@github.com command fine and it says i'm authenticated with my proper user account and everything.

ssh -T git@github.com
Hi ca-mantis-shrimp! You've successfully authenticated, but GitHub does not provide shell access.

Literally the only thing that is broken is recursively updating submodules and it is driving me crazy, everything i'm reading say I just need to replace the public key but I really don't think that's the problem or i'm missing something

and yes, I'm add the ssh key and ensure the agent is running in the background.

I get

/usr/lib/git-core/git-submodule: 88: gettext: Permission denied
/usr/lib/git-core/git-submodule: 1: envsubst: Permission denied
/usr/lib/git-core/git-submodule: 88: envsubst: Permission denied
/usr/lib/git-core/git-submodule: 1: envsubst: Permission denied
/usr/lib/git-core/git-submodule: 88: gettext: Permission denied
/usr/lib/git-core/git-submodule: 88: envsubst: Permission denied
...

when trying to update

I've deleted the repo and tried cloning it back, I really can't think of what could be wrong here.

Solution: In my case, the problem was that I needed to install gettext package as a super user it simply wasn't in the partition.

Thank you to @VonC for your detailed advice!

dejanualex
  • 3,872
  • 6
  • 22
  • 37

1 Answers1

0

First, try the same test with a private ssh key without passphrase, again, for testing only.
That way, you don't have to deal with the ssh-agent while you are checking for the root cause of that "Permission denied" issue.

Check again that ssh -Tv -i /my/private/key git@github.com does work (display a Welcome message)

Second, set the GIT_SHS_COMMAND environment variable to display debug information:

export GIT_SSH_COMMAND='ssh -Tv -i /my/private/key'

As in this question, double-check also the rights of your:

  • Git installation in /usr/lib/git-core/ (for example: installed as root, with 754 instead of 755 would means you cannnot execute them)
  • /usr/bin (where gettext or envsubst reside), to check a script does have the right to execute them.
  • the local repository being updated
  • the process launching vim

The OP confirm that gettext is not even present in /usr/bin

sudo apt update && sudo apt upgrade -y
# Install Tools
sudo apt-get install gettext
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I checked /usr/lib/git-core and it seems like the relevant files are fine on permissions ``` -rwxr-xr-x 1 root root 20561 Feb 16 23:55 git-submodule lrwxrwxrwx 1 root root 3 Feb 16 23:55 git-submodule--helper -> git ``` I checked the /usr/bin folder and it has neither of the programs `gettext` nor `envsubst` vim shouldn't be the problem since i can run it fine and there isn't a poblem with starting vim itself, just updating submodules i use for packages and my local repository is able to be update and pushed, just none of the submodules can be updated from external sources. – Darrion Burgess Mar 20 '21 at 13:38
  • @DarrionBurgess Considering I see `gettext: Permission denied`, I would rather check the system commands, or some issue with an antivirus, as in https://superuser.com/q/1566799/141 – VonC Mar 20 '21 at 13:41
  • O and yes I tried your top command and I still am able to get in to github with the SSH command given – Darrion Burgess Mar 20 '21 at 13:46