git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] git remote add failure

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 18, 2007, 16:09 UTC
Message-ID
<Pine.LNX.4.64.0710181708230.25221@racer.site>
In-Reply-To
<1192697719.31199.1216526739@webmail.messagingengine.com>
Hi,
On Thu, 18 Oct 2007, Guido Ostkamp wrote:
Show 13 quoted lines
> I think I've found a bug in "git remote add". I tried the following:
> 
> $ git remote add -f spearce2 http://repo.or.cz/git/spearce.git
> Cannot get the repository state from http://repo.or.cz/git/spearce.git
> fetch spearce2: command returned error: 1
> 
> Obviously I used the wrong URI. Then I tried again:
> 
> $ git remote add -f spearce2 http://repo.or.cz/r/git/spearce.git
> remote spearce2 already exists.
> 
> I think Git should not store the bad info and block the name when the
> first call wasn't successfull.

The problem there is of course that the fetch could fail because you are offline. In that case, you do not want git remote to throw the information away.

BTW you missed the trailing slash in the HTTP URL, I guess.

Ciao, Dscho

Previous: Guido OstkampNext: Shawn O. Pearce
Message 2 of 3 in “[BUG] git remote add failure”
  1. Guido OstkampOct 18, 2007
  2. Johannes SchindelinOct 18, 2007
  3. Shawn O. PearceOct 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.