tech:git:server

Diferències

Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.

Enllaç a la visualització de la comparació

Següent revisió
Revisió prèvia
tech:git:server [02/03/2021 06:26] – creat matetech:git:server [09/03/2021 00:37] (actual) – [seguridad] mate
Línia 1: Línia 1:
 = git repo server = git repo server
-[[https://www.linux.com/training-tutorials/how-run-your-own-git-server/]] 
  
-== crear repositorio bare+== 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> <code bash>
 mkdir repo.git mkdir repo.git
Línia 8: Línia 34:
 </code> </code>
  
-== crear repositorio para compartir+=== crear repositorio para compartir
 <code bash> <code bash>
 git init --bare --shared=group repo_path git init --bare --shared=group repo_path
 chgrp -R foo repo_path chgrp -R foo repo_path
 </code> </code>
-== convertir repositorio a su versión bare+ 
 +=== convertir repositorio a su versión bare
 <code bash> <code bash>
 mv repo/.git repo.git mv repo/.git repo.git
  • tech/git/server.1614695190.txt.gz
  • Darrera modificació: 02/03/2021 06:26
  • per mate