# Challenge with Git-Bash

9 messages from 2010-07-17 to 2010-07-19. Participants: Rainer Lauer, Ævar Arnfjörð Bjarmason, Jonathan Nieder, Eric Raible.
Thread: https://gitlist.dev/t/24423

## Rainer Lauer, 2010-07-17 16:20

Subject: Challenge with Git-Bash
Message-ID: <001d01cb25cb$eb176980$c1463c80$@net>
URL: https://gitlist.dev/e/001d01cb25cb%24eb176980%24c1463c80%24%40net

```
Hello,
with my Windows 7 Git-Installation I get following challenge:
1)	Set GIT_EDITOR to editor of your choice
2)	With Windows7 let this editor run in admin-mode
	Goto .exe-file -> right mouse-click -> compatibility -> run program
as admin (I'm running a German version maybe English names are slightly
different)
3)	Make a git action like git add file
                             git commit
	from the git bash.
4)	Now following message appears:  sh.exe: ./"editor of your choice":
Bad file number
Everything is fine without Admin-Mode set for editor. In other words if you
get rid of step 2) step 4) doesn't appear instead the editor starts.
Due to other tasks my editor of choice has to run in this mode - stupid
enough.

Any chance to get around this problem?
(No not taking a different editor, no not getting rid of admin mode :) )

Reggies,
Rainer Lauer

```

## Ævar Arnfjörð Bjarmason, 2010-07-17 16:36

Subject: Re: Challenge with Git-Bash
Message-ID: <AANLkTinKt2Mbsw4SbTCjbTOuzOpzYEBjQsGGh2Fq67Bo@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinKt2Mbsw4SbTCjbTOuzOpzYEBjQsGGh2Fq67Bo%40mail.gmail.com
In-Reply-To: <001d01cb25cb$eb176980$c1463c80$@net>

```
On Sat, Jul 17, 2010 at 16:20, Rainer Lauer <lauerr@gmx.net> wrote:
> Hello,
> with my Windows 7 Git-Installation I get following challenge:
> 1)      Set GIT_EDITOR to editor of your choice
> 2)      With Windows7 let this editor run in admin-mode
>        Goto .exe-file -> right mouse-click -> compatibility -> run program
> as admin (I'm running a German version maybe English names are slightly
> different)
> 3)      Make a git action like git add file
>                             git commit
>        from the git bash.
> 4)      Now following message appears:  sh.exe: ./"editor of your choice":
> Bad file number
> Everything is fine without Admin-Mode set for editor. In other words if you
> get rid of step 2) step 4) doesn't appear instead the editor starts.
> Due to other tasks my editor of choice has to run in this mode - stupid
> enough.
>
> Any chance to get around this problem?
> (No not taking a different editor, no not getting rid of admin mode :) )

Did you actually set "GIT_EDITOR" to the string "editor of your
choice", as opposed to the full path to Emacs, notepad or something
like that?

```

## Jonathan Nieder, 2010-07-17 17:13

Subject: Re: Challenge with Git-Bash
Message-ID: <20100717171303.GB10730@burratino>
URL: https://gitlist.dev/e/20100717171303.GB10730%40burratino
In-Reply-To: <001d01cb25cb$eb176980$c1463c80$@net>

```
(+cc: msysgit)

Hi Rainer,

Rainer Lauer wrote:

> with my Windows 7 Git-Installation I get following challenge:
>
> 1)	Set GIT_EDITOR to editor of your choice
>
> 2)	With Windows7 let this editor run in admin-mode
> 	Goto .exe-file -> right mouse-click -> compatibility -> run program
>	as admin (I'm running a German version maybe English names are slightly
>	different)
>
> 3)	Make a git action like git add file
>	                       git commit
> 	from the git bash.
>
> 4)	Now following message appears:  sh.exe: ./"editor of your choice":
> Bad file number
>
> Everything is fine without Admin-Mode set for editor.

Apparently “Bad file number” can mean “Permission denied” among other
things on Windows.  I do not have any better suggestion than to try
running git bash as administrator too, sorry.

Regards,
Jonathan

```

## Ævar Arnfjörð Bjarmason, 2010-07-18 14:55

Subject: Re: Challenge with Git-Bash
Message-ID: <AANLkTinODbTbZ7CXaAxs83T_pdyvafWnjSI8kzjcWAXN@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinODbTbZ7CXaAxs83T_pdyvafWnjSI8kzjcWAXN%40mail.gmail.com
In-Reply-To: <007d01cb2687$62100a90$26301fb0$@gmx.net>

```
On Sun, Jul 18, 2010 at 14:42, Rainer Lauer <lauerr@gmx.net> wrote:
> Hi,
> thanks for the reply. I did set the full path to my editor of choice.

Good that it worked out. CC-ing the list so that others encountering
this problem will find the solution.

```

## Rainer Lauer, 2010-07-18 17:02

Subject: AW: Challenge with Git-Bash
Message-ID: <007f01cb269b$0015dbd0$00419370$@gmx.net>
URL: https://gitlist.dev/e/007f01cb269b%240015dbd0%2400419370%24%40gmx.net
In-Reply-To: <AANLkTinODbTbZ7CXaAxs83T_pdyvafWnjSI8kzjcWAXN@mail.gmail.com>

```
Hi,
from Jonathan Nieder <jrnieder@gmail.com> I got a successfully work-around. See attached mail.
Thanks for your support and amazingly fast response.

Regis,
Rainer Lauer

-----Ursprüngliche Nachricht-----
Von: Ævar Arnfjörð Bjarmason [mailto:avarab@gmail.com] 
Gesendet: Sonntag, 18. Juli 2010 16:56
An: Rainer Lauer
Cc: Git Mailing List
Betreff: Re: Challenge with Git-Bash

On Sun, Jul 18, 2010 at 14:42, Rainer Lauer <lauerr@gmx.net> wrote:
> Hi,
> thanks for the reply. I did set the full path to my editor of choice.

Good that it worked out. CC-ing the list so that others encountering this problem will find the solution.


(+cc: msysgit)

Hi Rainer,

Rainer Lauer wrote:

> with my Windows 7 Git-Installation I get following challenge:
>
> 1)	Set GIT_EDITOR to editor of your choice
>
> 2)	With Windows7 let this editor run in admin-mode
> 	Goto .exe-file -> right mouse-click -> compatibility -> run program
>	as admin (I'm running a German version maybe English names are slightly
>	different)
>
> 3)	Make a git action like git add file
>	                       git commit
> 	from the git bash.
>
> 4)	Now following message appears:  sh.exe: ./"editor of your choice":
> Bad file number
>
> Everything is fine without Admin-Mode set for editor.

Apparently “Bad file number” can mean “Permission denied” among other
things on Windows.  I do not have any better suggestion than to try
running git bash as administrator too, sorry.

Regards,
Jonathan

```

## Rainer Lauer, 2010-07-18 18:08

Subject: AW: Challenge with Git-Bash
Message-ID: <008a01cb26a4$4313e360$c93baa20$@gmx.net>
URL: https://gitlist.dev/e/008a01cb26a4%244313e360%24c93baa20%24%40gmx.net
In-Reply-To: <20100717171303.GB10730@burratino>

```
Hi Jonathan,
thanks for this hint. Now it is working on the base of environment variables.

In order of automatically setting up my projects I'd like to use the configuration file for preparing  CVS-work instead introducing environment variables.
Unfortunately, I'm facing another problem.
Following commands don't modify .git/config coming along with my project(s).
git config user.name="Rainer Lauer"
git config user.email="Rainer.Lauer@gmx.net"
git config core.editor="c:/Program Files/SlickEditV14.0.2/win/vs.exe"
The file seems to stay in initial revision as created with the command git init.

Where is following information stored? Command:  git config --global user.name="Rainer Lauer". Did I get the documentation right that this is a definition for all projects?

Regards,
Rainer

-----Ursprüngliche Nachricht-----
Von: Jonathan Nieder [mailto:jrnieder@gmail.com] 
Gesendet: Samstag, 17. Juli 2010 19:13
An: Rainer Lauer
Cc: git@vger.kernel.org; msysgit@googlegroups.com
Betreff: Re: Challenge with Git-Bash

(+cc: msysgit)

Hi Rainer,

Rainer Lauer wrote:

> with my Windows 7 Git-Installation I get following challenge:
>
> 1)	Set GIT_EDITOR to editor of your choice
>
> 2)	With Windows7 let this editor run in admin-mode
> 	Goto .exe-file -> right mouse-click -> compatibility -> run program
>	as admin (I'm running a German version maybe English names are slightly
>	different)
>
> 3)	Make a git action like git add file
>	                       git commit
> 	from the git bash.
>
> 4)	Now following message appears:  sh.exe: ./"editor of your choice":
> Bad file number
>
> Everything is fine without Admin-Mode set for editor.

Apparently “Bad file number” can mean “Permission denied” among other things on Windows.  I do not have any better suggestion than to try running git bash as administrator too, sorry.

Regards,
Jonathan

```

## Ævar Arnfjörð Bjarmason, 2010-07-18 18:11

Subject: Re: Challenge with Git-Bash
Message-ID: <AANLkTinZCKIDh8bJUVXceqNYD1qkmWZ1fO67t0XJI5Uo@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinZCKIDh8bJUVXceqNYD1qkmWZ1fO67t0XJI5Uo%40mail.gmail.com
In-Reply-To: <008a01cb26a4$4313e360$c93baa20$@gmx.net>

```
On Sun, Jul 18, 2010 at 18:08, Rainer Lauer <lauerr@gmx.net> wrote:
> Hi Jonathan,
> thanks for this hint. Now it is working on the base of environment variables.
>
> In order of automatically setting up my projects I'd like to use the configuration file for preparing  CVS-work instead introducing environment variables.
> Unfortunately, I'm facing another problem.
> Following commands don't modify .git/config coming along with my project(s).
> git config user.name="Rainer Lauer"
> git config user.email="Rainer.Lauer@gmx.net"
> git config core.editor="c:/Program Files/SlickEditV14.0.2/win/vs.exe"
> The file seems to stay in initial revision as created with the command git init.
>
> Where is following information stored? Command:  git config --global user.name="Rainer Lauer". Did I get the documentation right that this is a definition for all projects?

If you're asking why your .git/config file isn't being carried over
when you clone the repository that's because it's not supposed to, Git
doesn't work like that.

```

## Jonathan Nieder, 2010-07-18 18:16

Subject: Files used by git config (Re: Challenge with Git-Bash)
Message-ID: <20100718181619.GA14367@burratino>
URL: https://gitlist.dev/e/20100718181619.GA14367%40burratino
In-Reply-To: <008a01cb26a4$4313e360$c93baa20$@gmx.net>

```
Hi again,

Rainer Lauer wrote:

> Where is following information stored?
> Command:  git config --global user.name="Rainer Lauer".

I recommend looking that the user manual[1] to start out.  It
has a few relevant hints.

From the preface:

	Comprehensive reference documentation is available
	through the man pages, or git-help(1) command. For
	example, for the command "git clone <repo>", you can
	either use:

	$ man git-clone

	or:

	$ git help clone

From the start to “chapter 3: developing with git”:

	Before creating any commits, you should introduce
	yourself to git. The easiest way to do so is to make sure
	the following lines appear in a file named .gitconfig in
	your home directory:

	[user]
		name = Your Name Comes Here
		email = you@yourdomain.example.com

	(See the "CONFIGURATION FILE" section of git-config(1)
	for details on the configuration file.)

Regards,
Jonathan

[1] http://kernel.org/pub/software/scm/git/docs/user-manual.html

```

## Eric Raible, 2010-07-19 18:09

Subject: Re: AW: Challenge with Git-Bash
Message-ID: <loom.20100719T200744-692@post.gmane.org>
URL: https://gitlist.dev/e/loom.20100719T200744-692%40post.gmane.org
In-Reply-To: <008a01cb26a4$4313e360$c93baa20$@gmx.net>

```
Rainer Lauer <lauerr <at> gmx.net> writes:

> Where is following information stored? Command:  git config --global 
user.name="Rainer Lauer".

The '=' appears in your config file (.git/config), but shouldn't be used
on the comand line.

```
