3

I'm using git for 1 month. I'm pushing my Android Projects to Bitbucket.

Sometimes I'm getting error like

fatal: Unable to find remote helper for 'https'

But as I said I'm using git for 1 month actually it run nice.
I searched so many times. I'm using Windows 10 Pro and git-2-12.2.2

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
TeyteyLan
  • 197
  • 1
  • 3
  • 13

6 Answers6

2

When I use windows/cmd or powershell I get that error, but on the same machine when I use gitbash I don't get the error. Try using gitbash, gives you nicer formatting anyway. Setting paths and remote urls as mentioned above are more likely solid solutions to the root of the problem, but I haven't had to do them. I realize this is not a solution to fixing the error msg, but merely using an alternative program that I think is already installed on your machine.

hd1coder
  • 21
  • 3
2

[[If you'r using git embedded in Android Studio] The problem is the default git.exe program run along with Android Studio did not support https. To Solve this problem you should install git and replace the default one. Do the following steps:

  1. Install latest git from: https://git-scm.com/download/win
  2. In Android Studio: File > Settings > Version Control > Git. In the "Path to Git execute", point to the location of git.exe (for ex. C:\Program Files\Git\bin\git.exe). Then run test.

If everything is Ok, there will be a popup message show git executed successfully and version of Git.

That's all. Try to pull the code again!

Sy C Dang
  • 53
  • 3
1

Try and make sure to reset (for testing) your path in a CMD session (again, just for testing, in that one CMD session):

set GH=C:\path\to\git2.12.2.2
set PATH=C:\windows\system32;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

Then try again to push.

If this is not working, Try setting up and register an ssh key and, as a workaround, use an ssh url:

git remote set-url origin git@bitbucket.org:username/repo.git
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

For me the @VonC method almost worked, I needed to also add %GH%\cmd to PATH.

set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%GH%\cmd;%PATH%

Also to note, I've been using Git installed with Visual Studio.

Martin Brisiak
  • 3,872
  • 12
  • 37
  • 51
0

Another way this error can occur is by a typo: an extra :.

$ git remote add testing file::/rubbish
$ git fetch testing

fatal: Unable to find remote helper for 'file'

$ git remote remove testing

The command should have looked like this (with a single colon)

$ git remote add testing file:/rubbish
Ivan
  • 4,383
  • 36
  • 27
0

I had a similar issue when deploying with GitHub Pages. I would run npm run deploy and get the same error.

The tutorial I followed suggested I use an HTTPS URL while setting up my project:

$ git remote add origin https://github.com/git-name/repo-name.git

Instead, I found that using an SSH URL resolved the error:

$ git remote add origin git@github.com:git-name/repo-name.git

While there's a debate on using HTTPS versus SSH, I saw that somebody else had solved a similar issue using SSH URL and tried it myself. Worked like a charm!

To check and change your remote origin, follow these commands:

$ git remote -v
$ git remote set-url origin git@github.com:git-name/repo-name.git