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

Re: Accessing a single repository with different addresses?

From
LRLuciano Rocha <luciano@eurotux.com>
Date
May 6, 2008, 16:58 UTC
Message-ID
<20080506165832.GA20228@bit.office.eurotux.com>
In-Reply-To
<8c0610ed0805060951x70ede89bq5a93e69aece8c8c7@mail.gmail.com>
On Tue, May 06, 2008 at 12:51:13PM -0400, Paul Holbrook wrote:
Show 8 quoted lines
> I have two machines at home that I've been using to play with git: a
> desktop box and a laptop.  I set up a repository on the desktop, and
> cloned it to the laptop via ssh, but using just a local 192.168.x.x
> address.  However, when I leave the house, I'd still like to be able
> to talk to the desktop repository, which I can still do via ssh back
> to the house - but now the address for that very same repository is
> not a 192 address, but a DNS name.   What's the best way to handle
> this?
Why not add a local dns server and use the same dns name?

Otherwise, I use a host declaration in .ssh/config, and switch as needed:

host desktop hostname 192.... user ...

But that was with svn. With git you can just add a new remote with the other address: git remote add rem host:....

-- 
Luciano Rocha <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>
Previous: Paul HolbrookNext: Jakub Narebski
Message 2 of 3 in “Accessing a single repository with different addresses?”
  1. Paul HolbrookMay 6, 2008
  2. Luciano RochaMay 6, 2008
  3. Jakub NarebskiMay 7, 2008

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.