Mostra la pàginaRevisions anteriorsQuè hi enllaçaExporta a PDFTorna dalt Aquesta pàgina és només de lectura. Podeu veure'n el codi font, però no podeu canviar-la. Consulteu el vostre administrador si penseu que això és degut a algun error. = git repo server == seguridad === protocolos [[https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#The-HTTP/S-Protocol]] * local * http(s) * Smart HTTP * Dumb HTTP * ssh * git === ssh * **git-shell** * ''usermod -s /usr/bin/git-shell <username>'' * **/etc/ssh/sshd_config**:<code> Match User git ForceCommand /usr/bin/git AllowTCPForwarding no X11Forwarding no </code> * **gitlab-ce**:<code ; ~git/.ssh/authorized_keys> command="/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AA...restofkeysnip! </code> * no **~/.bashrc**, **~/.profile** * [[https://unix.stackexchange.com/questions/489771/block-git-user-from-login-but-allow-the-user-to-still-function-as-a-git-repo]] == repositorio [[https://www.linux.com/training-tutorials/how-run-your-own-git-server/]] === crear repositorio bare <code bash> mkdir repo.git git --git-dir=repo.git init %%--%%bare </code> === crear repositorio para compartir <code bash> git init --bare --shared=group repo_path chgrp -R foo repo_path </code> === convertir repositorio a su versión bare <code bash> mv repo/.git repo.git git --git-dir=repo.git config core.bare true rm -rf repo </code> <code> git clone --bare repo_path bare_repo_path </code> <code> git clone --mirror repo_path bare_repo_path </code> Set up a mirror of the source repository. This implies %%--%%bare. Compared to %%--%%bare, %%--%%mirror not only maps local branches of the source to local branches of the target, it maps all refs (including remote-tracking branches, notes etc.) and sets up a refspec configuration such that all these refs are overwritten by a git remote update in the target repository. [[https://git-scm.com/docs/git-clone]] tech/git/server.txt Darrera modificació: 09/03/2021 00:37per mate