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

Re: [PATCH] Give error when no remote is configured

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Mar 17, 2009, 16:06 UTC
Message-ID
<alpine.LNX.1.00.0903171121260.19665@iabervon.org>
In-Reply-To
<49BEEAF4.40403@develer.com>
On Tue, 17 Mar 2009, Giovanni Bajo wrote:
Show 15 quoted lines
> On 3/16/2009 9:01 PM, Jay Soffian wrote:
> > On Mon, Mar 16, 2009 at 12:55 PM, Daniel Barkalow <barkalow@iabervon.org>
> > wrote:
> > > No default remote is configured for your current branch, and the default
> > > remote "origin" is not configured either.
> > 
> > The use of "default" twice is slightly confusing. Perhaps:
> > 
> > No remote is configured for the current branch, and the default
> > remote "origin" is not configured either.
> 
> I'm a total newbie with git. I must say that the above sentence means
> absolutely nothing to me (in either version) because of the confusing usage of
> the word "remote" (twice, one as a substantive, one as an adjective) and the
> word "origin" which is git jargon which I don't master yet.

Actually, it's not that complicated a sentence. In order to fetch/pull/push, you need to specify some attributes of the other side; at a minimum, this is the location, but you can also specify other things (HTTP gateways if you're using HTTP, for example). You can have multiple of these sets of configuration stored under different names; these are remotes.

When you run fetch, you can specify the remote on the command line. If you don't specify, there are two levels of defaults: the first is a setting in the configuration for whichever branch is current; the second is the constant "origin".

The message is trying to say that it fell back to looking for a configured remote named "origin", but there wasn't one configured.

Show 7 quoted lines
> My suggestion is that you should at least add a sentence that points to a
> likely solution. Something like:
> 
>   (use "git remote add" to configure a remote URL)
> 
> Note that I don't have any clue if this sentece is correct and/or is the
> correct solution. The above is just an example of a helpful error message.

The problem is that there are a number of different sorts of configuration you might want, and we have no way of knowing which it is.

You might mean to explicitly specify URLs every time to fetch or push in this repository; you might mean to have a different URL for each branch you work on; or you might mean to have a general default. It's also possible that you actually meant "git svn fetch", which uses different configuration info.

So I think we can only give pointers to the various things it looked for, and leave it up to the documentation to explain which you want, if any, and how to get it.

	-Daniel
*This .sig left intentionally blank*
Previous: Giovanni Bajo
Message 7 of 7 in “Give error when no remote is configured”
  1. Give error when no remote is configuredDaniel Barkalow, Mar 11, 2009
  2. Bernie InnocentiMar 11, 2009
  3. Junio C HamanoMar 16, 2009
  4. Daniel BarkalowMar 16, 2009
  5. Jay SoffianMar 16, 2009
  6. Giovanni BajoMar 17, 2009
  7. Daniel BarkalowMar 17, 2009

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.