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?
Asked
Active
Viewed 271 times
3 Answers
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://
)
-
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
- 127,052
- 24
- 157
- 134