2

I have a linux (debian) computer and a mac (10.4) connected through a dhcp router. Now I installed gitolite on the linux box to have a central git repository. My problem now is that I'll always have a different IP when I start the linux computer and I cannot configure the router to give the computers in the network fixed IPs. So my question is: What would be the best way to work with that? Is it possible to define the current linux box IP in /etc/hosts under a domain name? Or should I enter the IPs to push the changes to manually each time? Or do you know any other solutions?

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
stofl
  • 2,908
  • 5
  • 33
  • 48

3 Answers3

0

Note:

You don't have to install Gitolite to have a central repository.
It is only an authorization layer.

You only need an ssh daemon access or an http server (with the git-http-backend CGI script) running on your Linux box.
If your Linux box has an hostname, you can use that to reference your linux services (ssh:// or http://)

Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • Note: some DHCP configuration could be needed: http://www.turnkeylinux.org/forum/support/20090212/register-hostname-dns – VonC Jul 02 '12 at 11:49
0

What other clients are you accessing the git machine from? With a collection of Linux boxes, you can install Avahi and the mdns hosts lookup method: then referring to hostname.local will resolve the hostname by using multicast queries on the local network.

(On Debian, just installing avahi-daemon on the server and client machines is sufficient, it contains this magic in /etc/nsswitch.conf by default:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

)

araqnid
  • 117,888
  • 23
  • 152
  • 133
0

Can't you define a static IP on your linux box ?

Gnujeremie
  • 550
  • 3
  • 15