emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using msysgit and Github and eshell/shell on Windows


From: Bastian Bechtold
Subject: Using msysgit and Github and eshell/shell on Windows
Date: Wed, 13 Jun 2012 10:08:41 +0200

Hi,

I have been using Emacs and git for a while now. It took a bit of tweaking to 
get it to work right on Windows, but worked really well after that.

Now the problem is, I now have a repository hosted on Github, which requires 
authentication.

Whenever I run any git command that requires authentication (push, pull, fetch 
basically), Emacs starts the git process, but it never finishes. If I use the 
same commands (with the same executables) in different shells such as CMD, 
powershell, the git shell or the msys shell, git prompts me for my username and 
password. If I run the same commands in Emacs on OSX, Emacs even prompts me for 
my possword in the minibuffer! On Windows however, Emacs does not prompt me for 
my username or password, but apparently still waits for it eternally and the 
command just never completes.

This happens with eshell, shell and magit on Windows only.

Here is the relevant section of my .emacs file:

(when (eq system-type 'windows-nt)
  (setq magit-git-executable "C:/Program Files (x86)/Git/bin/git.exe")
  ;; so git opens emacs if invoked from emacs
  (setenv "EDITOR" "C:/PROGRA~2/emacs/bin/emacs.exe")
  ;; so eshell uses git.exe instead of git.cmd, which is achingly slow
  (setenv "PATH" (concat "C:\\Program Files (x86)\\Git\\bin;" (getenv "PATH")))
  ;; so shell finds all the msys binaries
  (setenv "PATH" (concat "C:\\MinGW\\msys\\1.0\\bin;" (getenv "PATH")))
  ;; so shell uses the MinGW bash shell
  (setq explicit-shell-file-name "C:/MinGW/msys/1.0/bin/bash")
  ;; so emacs finds the vital binaries like diff.exe
  (add-to-list 'exec-path "C:/MinGW/msys/1.0/bin"))

Any pointers on how to debug this would be greatly appreciated.

Kind regards,
Bastian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]