Git fatal: unable to find remote helper for https


I built my 2nd snap ever this week so I’m pretty new around here. I included the stage-package git in my snap but when I try to use git to fetch I receive the error fatal: unable to find remote helper for 'https' . Doing an strace on my system git I can see the binary git-remote-https being called. When I search for this binary under /snap it is not found so I think this is the issue.

My question is, why does the git stage-package for core20 differ from the git package found in focal? clearly shows that git-remote-https is part of the git package. I’m totally confused how to get HTTPS support in my snap. Please help!

You need to tell Git where to find its stuff. Try setting GIT_EXEC_PATH et al.


  GIT_EXEC_PATH: $SNAP/usr/lib/git-core
  GIT_TEMPLATE_DIR: $SNAP/usr/share/git-core/templates

You are a genius! Setting the environment variables resolved the issue. Thanks for seeing through to the actual issue!

Title updated for anyone else who stumbles across this.

1 Like