# Git Gui Clone: Error Failed to create repository (with hints)

2 messages from 2024-03-29 to 2024-04-03. Participants: Tobias Boesch, Jeff King.
Thread: https://gitlist.dev/t/61226

## Tobias Boesch, 2024-03-29 21:12

Subject: Git Gui Clone: Error Failed to create repository (with hints)
Message-ID: <6aadf39561e13681c069d4da7b1a4581f143dc92.camel@googlemail.com>
URL: https://gitlist.dev/e/6aadf39561e13681c069d4da7b1a4581f143dc92.camel%40googlemail.com

```
Hello everyone,

when I clone a git repo (from github or COdeberg) through Git Gui I get
the following GUI error (nothing in the terminal and nothing in
journalctl):

"Failed to create repository <repo-path>: Hint Using 'master' as the
name for the initial branch. This default branch..." and so on.

Screenshot
https://i.postimg.cc/66df98MZ/Screenshot-from-2024-03-29-22-06-49.png

I have no idea what is going on here. Has someone an idea what the
reason could be?

Cloning the same source into the same path from command line works.
The cloned git repo opens fine in git gui.

Best wishes
Tobias

```

## Jeff King, 2024-04-03 01:30

Subject: Re: Git Gui Clone: Error Failed to create repository (with hints)
Message-ID: <20240403013039.GD892394@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20240403013039.GD892394%40coredump.intra.peff.net
In-Reply-To: <6aadf39561e13681c069d4da7b1a4581f143dc92.camel@googlemail.com>

```
On Fri, Mar 29, 2024 at 10:12:17PM +0100, Tobias Boesch wrote:

> when I clone a git repo (from github or COdeberg) through Git Gui I get
> the following GUI error (nothing in the terminal and nothing in
> journalctl):
> 
> "Failed to create repository <repo-path>: Hint Using 'master' as the
> name for the initial branch. This default branch..." and so on.
> 
> Screenshot
> https://i.postimg.cc/66df98MZ/Screenshot-from-2024-03-29-22-06-49.png
> 
> I have no idea what is going on here. Has someone an idea what the
> reason could be?

I don't work on or use git-gui, but it is written in Tcl/Tk. And IIRC
Tcl is very anxious to consider programs that print anything to stderr
as "failed". And in this case we are just printing warning/hint
diagnostics to stderr.

I suspect there are solutions within git-gui's code base to check the
actual exit code, and it's just a bug that we're not using them in this
instance. But the obvious workaround in the meantime is to set the
config that the hint mentions, which should silence it.

> Cloning the same source into the same path from command line works.
> The cloned git repo opens fine in git gui.

Right, the clone is happening fine. It's just that git-gui is
incorrectly thinking that it failed.

-Peff

```
