Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git: 'remote-https' is not a git command. See 'git --help' #10345

Closed
Shivam-2326 opened this issue Aug 7, 2020 · 30 comments
Closed

git: 'remote-https' is not a git command. See 'git --help' #10345

Shivam-2326 opened this issue Aug 7, 2020 · 30 comments
Labels
support Issues likely related to one person's environment or configuration

Comments

@Shivam-2326
Copy link

Describe the feature or problem you’d like to solve

A clear and concise description of what the feature or problem is.

Proposed solution

How will it benefit Desktop and its users?

Additional context

Add any other context like screenshots or mockups are helpful, if applicable.

@Shivam-2326
Copy link
Author

I am gitting this whenever I push my local changes to the remote repository. Please try to fix this problem

@steveward
Copy link
Member

Can you try reinstalling GitHub Desktop by following these steps?

  1. Close GitHub Desktop (you may need to use the Task Manger if you are unable to close the application directly)
  2. Remove all of the files in %LOCALAPPDATA%\GitHubDesktop\
  3. Reinstall GitHub Desktop from http://desktop.github.com

Let me know if that doesn't get things working.

@steveward steveward added the support Issues likely related to one person's environment or configuration label Aug 7, 2020
@gerardreches
Copy link

I'll join this issue since it has been opened many times before but this instance is recent. I'm getting the same problem:

screenshot

It doesn't matter if it's a clone, push, fetch or pull, it will appear every time. Reinstalling the application made it work just once, and the next time I rebooted my PC it appeared again.

@gerardreches
Copy link

Can you try reinstalling GitHub Desktop by following these steps?

1. Close GitHub Desktop (you may need to use the Task Manger if you are unable to close the application directly)

2. Remove all of the files in `%LOCALAPPDATA%\GitHubDesktop\`

3. Reinstall GitHub Desktop from http://desktop.github.com

Let me know if that doesn't get things working.

On Windows 10:

  1. Done
  2. Removed directory user/AppData/Local/GithubDesktop
  3. Done

The issue persists.

@steveward
Copy link
Member

@gerardreches thanks for testing that out. Are you running any security/antivirus software on this machine that could be interfering with the installation of GitHub Desktop?

@gerardreches
Copy link

Hey @steveward , there is a HUGE amount opened issues for this same problem, and I think they should be merged to focus on a single thread:

#6605
#6787
#7451
#8223
#9229
#9390
#9516
#9556
#9568
#9937
#10203
#10345
#10367

This are just some of the opened issues for this same problem that I've found with a simple search, and I'm sure that many more can be found. This is a critical issue since we have to end up using the command line for our Git tasks. It's reason enough for most people to not use Github Desktop anymore.

If you want, I can open a new issue detailing the problem the best I can and then you can merge all these other opened issues into it so that we can work on it from there.

@gerardreches
Copy link

@gerardreches thanks for testing that out. Are you running any security/antivirus software on this machine that could be interfering with the installation of GitHub Desktop?

And about your question, no, the only security/antivirus software that I'm running is Windows Defender, that comes in all Windows 10 installations. I also have a MacBook Pro and Github Desktop is running with no issues there, so something to ask might be the OS that the people with this issue are running.

There's nothing that seems wrong about the installation, and even when opening Github Desktop with admin privileges the error still appears. It's nothing that shows up when you open it, but when you attempt to do any action that makes Github Desktop try to connect with any remote repository.

@niik
Copy link
Member

niik commented Aug 13, 2020

Hi @gerardreches, thanks for doing the digging to produce that list of related issues. We see this issue every now and then but we've never been able to reproduce it. For some users their anti virus seems to be the culprit and for others a complete reinstallation seems to solve it implying that something (AV or other tool) has modified the Git folder we bundle with GitHub Desktop. We would love some help trying to get to the bottom of this, I've got a hunch of what might be going on but I'll need your help to validate it.

Do you know if you've installed Git for Windows separately from GitHub Desktop or if you've got any other application installed on your system that bundles Git?

Could you open the DevTools console (View menu followed by Toggle Developer Tools) and type JSON.stringify(process.env)` into the console and copy and paste the output here? Should look something like this:

image

How are you launching GitHub Desktop. Via a start menu shortcut, desktop shortcut, or through some other tool?

Does your repository contain any Git hooks that you're aware of?

Does your repository make use of Git LFS?

@gerardreches
Copy link

Do you know if you've installed Git for Windows separately from GitHub Desktop or if you've got any other application installed on your system that bundles Git?

Yes, I've installed it separately from GitHub Desktop and long ago before it. Installed from: https://git-scm.com/

I've also some VMs including Git, but since they are like a separated machine, it shouldn't affect.

Could you open the DevTools console (View menu followed by Toggle Developer Tools) and type JSON.stringify(process.env)` into the console and copy and paste the output here? Should look something like this:

"{"ALLUSERSPROFILE":"C:\\ProgramData","ANDROID_SDK_HOME":"C:\\Android","APPDATA":"C:\\Users\\Gerard\\AppData\\Roaming","ChocolateyInstall":"C:\\ProgramData\\chocolatey","ChocolateyLastPathUpdate":"do. ene. 28 17:24:57 2018","CommonProgramFiles":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","COMPUTERNAME":"GERARD-FIX","ComSpec":"C:\\WINDOWS\\system32\\cmd.exe","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","FPS_BROWSER_APP_PROFILE_STRING":"Internet Explorer","FPS_BROWSER_USER_PROFILE_STRING":"Default","FP_NO_HOST_CHECK":"NO","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\Gerard","JAVA_HOME":"C:\\Program Files\\Java\\jdk1.8.0_65\\","LOCALAPPDATA":"C:\\Users\\Gerard\\AppData\\Local","LOCAL_GIT_DIRECTORY":"C:\\Users\\Gerard\\AppData\\Local\\GitHubDesktop\\app-2.5.3\\resources\\app\\git","LOGONSERVER":"\\\\GERARD-FIX","NUMBER_OF_PROCESSORS":"4","OculusBase":"C:\\Program Files\\Oculus\\","OneDrive":"A:\\Bibliotecas\\OneDrive","OneDriveConsumer":"A:\\Bibliotecas\\OneDrive","OS":"Windows_NT","path":"C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\Oculus\\Support\\oculus-runtime;C:\\Program Files (x86)\\Razer Chroma SDK\\bin;C:\\Program Files\\Razer Chroma SDK\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;P:\\Programacion\\xampp\\php;P:\\Programacion\\Brackets\\command;C:\\Program Files (x86)\\AMD\\ATI.ACE\\Core-Static;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static;C:\\Programas\\Programacion\\xampp\\php;C:\\Program Files (x86)\\GtkSharp\\2.12\\bin;C:\\Users\\Gerard\\AppData\\Roaming\\Composer\\vendor\\bin;C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps;C:\\ProgramData\\chocolatey\\bin;C:\\Programas\\Programacion\\nodejs\\;C:\\Program Files (x86)\\Yarn\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Programas\\Programacion\\Microsoft VS Code\\bin;C:\\Program Files\\dotnet\\;C:\\Android;C:\\Windows\\System32;P:\\HashiCorp\\Vagrant\\bin;C:\\Users\\Gerard\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Gerard\\AppData\\Roaming\\npm;C:\\Users\\Gerard\\AppData\\Local\\Yarn\\bin;C:\\Programas\\Programacion\\Microsoft VS Code\\bin;P:\\Microsoft VS Code Insiders\\Microsoft\\bin;C:\\Users\\Gerard\\AppData\\Local\\GitHubDesktop\\bin","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 60 Stepping 3, GenuineIntel","PROCESSOR_LEVEL":"6","PROCESSOR_REVISION":"3c03","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","PSModulePath":"C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules\\","PUBLIC":"C:\\Users\\Public","SESSIONNAME":"Console","SystemDrive":"C:","SystemRoot":"C:\\WINDOWS","TEMP":"C:\\Users\\Gerard\\AppData\\Local\\Temp","TMP":"C:\\Users\\Gerard\\AppData\\Local\\Temp","USERDOMAIN":"GERARD-FIX","USERDOMAIN_ROAMINGPROFILE":"GERARD-FIX","USERNAME":"Gerard","USERPROFILE":"C:\\Users\\Gerard","VBOX_MSI_INSTALL_PATH":"P:\\Oracle\\VirtualBox\\","VS140COMNTOOLS":"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\","windir":"C:\\WINDOWS"}"

How are you launching GitHub Desktop. Via a start menu shortcut, desktop shortcut, or through some other tool?

Start menu shortcut. Launching it via desktop shortcut made no difference.

Does your repository contain any Git hooks that you're aware of?

Nope, I've never used them.

Does your repository make use of Git LFS?

Negative. But in the past I had one and I had no problems with it.

I hope this helps.

@niik
Copy link
Member

niik commented Aug 14, 2020

@gerardreches Thanks so much for that information. While it unfortunately disproved my hypothesis of what's going on at least we have some more information to go on. Do you know if this started happening recently or as a result of some upgrade to GitHub Desktop?

@gerardreches
Copy link

@gerardreches Thanks so much for that information. While it unfortunately disproved my hypothesis of what's going on at least we have some more information to go on. Do you know if this started happening recently or as a result of some upgrade to GitHub Desktop?

I cannot confirm that, but unless it upgrades in the background, I didn't upgrade it. It was working fine about 2-3 weeks ago, then I went on holidays for a week, and when I was back it was not working. So I assume it started happening recently, but if we take a look at the other opened issues, it's not really something that appeared recently for the first time.

@jamesgreenesr

This comment has been minimized.

@KisenaMiyuki
Copy link

I think I should provide some help with this :
When I open GithubDesktop.exe directly from file explorer this error occurs (no matter the one inside app-2.5.3 folder or the one outside).
But when I open GithubDesktop.exe from Listary the error is gone (again no matter which .exe).
I have no idea why this happens but, maybe it can help.

@steveward
Copy link
Member

@KisenaMiyuki that's helpful. Could you try running github from the command line to see if you can reproduce the error again?

@KisenaMiyuki
Copy link

@steveward I have tried PowerShell, cmd and git bash.
PowerShell's try ended up with this error but the other two didn't.
By the way I'm a newbie in cs and I just typed in the path to the exe without any parameters, is that okay?

@GrahamSH-EXB
Copy link

I’m also getting this issue. Reinstalling didn’t help. It makes GH Desktop unusable, so I would appreciate if this was fixed.

@mahletb
Copy link

mahletb commented Dec 15, 2020

I am also getting this issue and reinstalling didn't help .

@steveward
Copy link
Member

@mahletb and @GrahamSH-EXB are either of you running antivirus software on your system that could be interfering with GitHub Desktop? Did you delete %LocalAppData%/GitHubDesktop prior to reinstalling?

@zuka1337
Copy link

I got the same error on virtual server:

git clone https://github.com/zuka1337/docker-cacti
Cloning into 'docker-cacti'...
git: 'remote-https' is not a git command. See 'git --help'.
  • Centos 7
  • git version 2.30.0
  • compiled source code

@paulthomson-v3
Copy link

I got the same error on virtual server:

git clone https://github.com/zuka1337/docker-cacti
Cloning into 'docker-cacti'...
git: 'remote-https' is not a git command. See 'git --help'.
  • Centos 7
  • git version 2.30.0
  • compiled source code

@zuka1337 - I've just come across the same issue on CentOS 7. Installing libcurl-devel and re-compiling fixed it for me.

@jdhao
Copy link

jdhao commented Mar 29, 2021

Same issue on CentOS 7.4. Installing libcurl-devel fix the issue for me (note that you need to re-build git after that).

Relevant post: https://stackoverflow.com/a/65876436/6064933

@Hao-tian-Zheng
Copy link

I got the same issue on Window 10.

Then I took the above measures, but the issue persists.

I think there might be a problem with the uninstall method.

I just used the uninstall method that comes with windows.
image
And reinstall Github Desktop from http://desktop.github.com.

The problem is solved.

@Nekuromu
Copy link

Also having this issue on Windows 10, reinstall worked for a single extra push before returning to doing this. Reinstalled and also deleted everything from roaming.

@steveward
Copy link
Member

@Nekuromu any chance you are running antivirus/security software other than Windows Defender on this machine?

@Fauzdar1
Copy link

Github Desktop version 2.9.0 (x64), reinstalling (using Control panel or Iobit Uninstaller) doesn't help anymore. It just doesn't work, trying previous versions.

@yuchen071
Copy link

Adding the folder containing git-remote-https.exe to PATH, in my case C:\Program Files\Git\mingw64\libexec\git-core, solved the problem for me.

Don't know why this is required as my other computer did not need this workaround for Github Desktop to work properly.

@lijo1989
Copy link

I got the same error on virtual server:

git clone https://github.com/zuka1337/docker-cacti
Cloning into 'docker-cacti'...
git: 'remote-https' is not a git command. See 'git --help'.
  • Centos 7
  • git version 2.30.0
  • compiled source code

@zuka1337 - I've just come across the same issue on CentOS 7. Installing libcurl-devel and re-compiling fixed it for me.

you saved the time... thanks bro

@zhuzi86
Copy link

zhuzi86 commented Mar 30, 2022

this is the answer

@ejtmaravillas
Copy link

Hopefully this one works for you.
I removed spaces with my file directories (foldername) and tried again.
or you can create new directory with folder names without spaces

@kikiwora
Copy link

Doing the brew upgrade git solved the issue for me.
Maybe someone will find this when Cocopods fail to update CocoaLumberjack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Issues likely related to one person's environment or configuration
Projects
None yet
Development

No branches or pull requests