Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] git-daemon: Wofür ist das?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3369
Location: de

PostPosted: Fri Nov 11, 2016 12:52 pm    Post subject: [solved] git-daemon: Wofür ist das? Reply with quote

Guten Mittag,

im Git-Paket gibt's einen Git-Daemon:
man wrote:
NAME
git-daemon - A really simple server for Git repositories

DESCRIPTION
A really simple TCP Git daemon that normally listens on port
"DEFAULT_GIT_PORT" aka 9418. It waits for a connection asking for a
service, and will serve that service if it is enabled.

It verifies that the directory has the magic file
"git-daemon-export-ok", and it will refuse to export any Git directory
that hasn’t explicitly been marked for export this way (unless the
--export-all parameter is specified). If you pass some directory paths
as git daemon arguments, you can further restrict the offers to a
whitelist comprising of those.

By default, only upload-pack service is enabled, which serves git
fetch-pack and git ls-remote clients, which are invoked from git fetch,
git pull, and git clone.

This is ideally suited for read-only updates, i.e., pulling from Git
repositories.

An upload-archive also exists to serve git archive.


Aber so richtig schlau werd ich daraus nicht.

Hintergrund der Frage:
Ich nutze meine NAS zur Verwaltung meiner Git-Repos. D.h. in /srv/git liegen die Repos. Auf die kann ich von meinen anderen Rechnern aus zugreifen per push/pull. Gitweb klappt auf der NAS ebenfalls.

Was macht jetzt noch der git-daemon darüberhinaus?


Last edited by musv on Tue Nov 29, 2016 7:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5329

PostPosted: Fri Nov 11, 2016 4:56 pm    Post subject: Reply with quote

der git-daemon bietet entsprechende repositories über das git:// protokoll an: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3369
Location: de

PostPosted: Tue Nov 29, 2016 7:43 pm    Post subject: Reply with quote

Hab das Ding jetzt zum Laufen gebracht. Mein System läuft auf Systemd, und natürlich ist die Systemd-Unit ziemlich kaputt. Die liest irgendwelche Config-Dateien überhaupt nicht ein. Entsprechend hab ich dann die Systemd-Unit etwas abgeändert.

/etc/systemd/system/git-daemon@.service:
[Unit]
Description=Git Repositories Server Daemon
Documentation=man:git-daemon(1)

[Service]
EnvironmentFile=-/etc/conf.d/git-daemon
User=git
Group=git
# Ignore non-zero exit status, access error makes git-daemon return them
ExecStart=-/usr/libexec/git-core/git-daemon --inetd "$GITDAEMON_OPTS"

StandardInput=socket
StandardOutput=inherit
StandardError=journal

Damit funktioniert's dann. Meine gesetzten Optionen:
/etc/conf.d/git-daemon:
GITDAEMON_OPTS="--syslog --verbose --base-path=/var/git --export-all --enable=receive-pack"


Ohne export-all sieht man das Projekt nicht. Und ohne receive-pack kann man nichts hochladen.

Benutzt wird das Ganze dann mit:
Code:
git clone git://mein_git_server:/Projekt.git
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum