casperdcl / cli

GitHub’s official command line tool

Home Page:https://cli.github.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snap Version unable to clone over HTTPS due to being "Unable to find remote helper for 'https'"

Unkn0wnCat opened this issue · comments

Describe the bug

When using the CLI from Snap latest and using HTTPS, cloning repositories fails with the error "fatal: Unable to find remote helper for 'https'".

Version:
gh version 1.8.1-51-g37ecdb93 (2021-04-09)
https://github.com/cli/cli/releases/latest

OS:
Name: Manjaro Linux
Version: 21.0 (Ornara)
Codename: Ornara

Steps to reproduce the behavior

  1. Download gh using snap install --edge gh
  2. Setup gh using gh auth login choosing HTTPS as the protocol
  3. Clone any repo e.g. gh repo clone Unkn0wnCat/Unkn0wnCat.net

Expected vs actual behavior

The CLI is supposed to clone the repo into a local directory, but instead it errors out due to not finding a remote helper for https.

Logs

$ gh repo clone Unkn0wnCat/Unkn0wnCat.net
Cloning into 'Unkn0wnCat.net'...
warning: templates not found /usr/share/git-core/templates
fatal: Unable to find remote helper for 'https'
exit status 128
commented

still facing same issue on Ubuntu 21.04

gh repo clone ***
Cloning into '***'...
warning: templates not found /usr/share/git-core/templates
fatal: Unable to find remote helper for 'https'
exit status 128

t:~/code$ gh version
gh version 1.9.2-32-g00df983d (2021-04-29)
https://github.com/cli/cli/releases/latest

Also facing the same error on Ubuntu 21.04 with version 1.10.2-15

$ gh repo clone opencv/opencv_contrib
Cloning into 'opencv_contrib'...
warning: templates not found /usr/share/git-core/templates
fatal: Unable to find remote helper for 'https'
exit status 128
$ gh version
gh version 1.10.2-15-gacbe28a8 (2021-06-02)
commented

I kept getting the same on the snap or apt-get package -

$ gh repo clone an_r-package  
2021/07/28 00:10:06.266593 cmd_run.go:1011: WARNING: cannot start document portal: dial unix /run/user/1000/bus: connect: permission denied
Cloning into 'an_r-package'...
warning: templates not found /usr/share/git-core/templates
fatal: Unable to find remote helper for 'https'
exit status 128

I was able to get this working by doing the

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh

https://github.com/cli/cli/blob/trunk/docs/install_linux.md

which gave the same version 1.13.1. The snap package and the default ubuntu package seems to be the same.
Hope this helps people.

Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

I kept getting the same on the snap or apt-get package -

$ gh repo clone an_r-package  
2021/07/28 00:10:06.266593 cmd_run.go:1011: WARNING: cannot start document portal: dial unix /run/user/1000/bus: connect: permission denied
Cloning into 'an_r-package'...
warning: templates not found /usr/share/git-core/templates
fatal: Unable to find remote helper for 'https'
exit status 128

I was able to get this working by doing the

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh

https://github.com/cli/cli/blob/trunk/docs/install_linux.md

which gave the same version 1.13.1. The snap package and the default ubuntu package seems to be the same. Hope this helps people.

Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal

I try to follow your instruction still can't fixed yet

Hi. I can solve this problem with an easy solution:
imagen

In case this can helps anyone.