User Tools

Site Tools


computing:gitserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:gitserver [2019/01/13 19:24] oemb1905computing:gitserver [2019/11/09 23:08] (current) oemb1905
Line 3: Line 3:
   * **Jonathan Haack**   * **Jonathan Haack**
   * **Haack's Networking**   * **Haack's Networking**
-  * **netcmnd@jonathanhaack.com** +  * **netcmnd@jonathanhaack.com**  
  
 ------------------------------------------- -------------------------------------------
Line 47: Line 47:
 This method has everyone using the user git in order to clone the repository, and unless tweaked will allow users shell access to the server.  To stop shell access, simply add :/bin/false to the end of the git user's entry in /etc/passwd.  Using other user names for access / cloning will be covered in a later tutorial.  Set the new origin as master: This method has everyone using the user git in order to clone the repository, and unless tweaked will allow users shell access to the server.  To stop shell access, simply add :/bin/false to the end of the git user's entry in /etc/passwd.  Using other user names for access / cloning will be covered in a later tutorial.  Set the new origin as master:
  
-  git remote set-url origin ssh://sexa@10.28.88.2:/srv/zion.git +  git remote set-url origin ssh://user@10.28.88.2:/srv/lion.git 
-  git remote set-url origin ssh://sexa@10.28.88.2:/media/sexa/Stores/Zion/zion.git +  git remote set-url origin ssh://user@10.28.88.2:/media/user/Store/Lion/lion.git 
-  git remote set-url origin ssh://sexa@10.28.88.2:46787/media/sexa/Stores/Zion/zion.git+  git remote set-url origin ssh://user@10.28.88.2:46787/media/user/Store/Lion/lion.git 
 +  git remote set-url origin ssh://user@10.28.28.2:/home/Lion/lion.git
      
 Of course, to clone the repository: Of course, to clone the repository:
      
-  git clone ssh://sexa@10.28.88.2:46787/media/sexa/Stores/Zion/zion.git+  git clone ssh://user@10.28.88.2:46787/media/users/Store/Lion/lion.git
      
 The restricted shell for git user may need to be restored to normal log in shell for certain repository servers. The restricted shell for git user may need to be restored to normal log in shell for certain repository servers.
Line 59: Line 60:
   git:x:1001:1001:,,,:/var/opt/gitlab:/bin/sh   git:x:1001:1001:,,,:/var/opt/gitlab:/bin/sh
      
 +Accessing the new server ... first, create your public/private keypair first ...
 +
 +  cd ~
 +  ssh-keygen
 +  cat ~/.ssh/id_rs.pub
 +
 +Then, ssh into your vps and/or simply do this on your localhost and clone the repo and make your first commit.  You can also do this with the Haacking Club repo.
 +
 +  cd ~
 +  mkdir git
 +  cd git/
 +  git clone git@hc.jonathanhaack.com:oemb1905/haackingclub.git
 +  cd haackingclub
 +  touch yourname.notes
 +  nano yourname.notes
 +  git add yourname.notes
 +  git commit -am"added my notes file and put my project description in it"
 +  git pull
 +  git push
 +
 +File and directory permission recommendations for git repository contents:
 +
 +  find .git -type d | xargs chmod 755
 +  find .git/objects -type f | xargs chmod 444
 +  find .git -type f | grep -v /objects/ | xargs chmod 644
 +  
 +Set the default editor
 +
 +  git config --global core.editor "nano"
 +
 This tutorial is a designated "Invariant Section" of the "Technotronic" section of Haack's Wiki as described on the [[https://jonathanhaack.com/dokuwiki/doku.php?id=start|Start Page]]. This tutorial is a designated "Invariant Section" of the "Technotronic" section of Haack's Wiki as described on the [[https://jonathanhaack.com/dokuwiki/doku.php?id=start|Start Page]].
  
- --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2019/01/13 12:24// 
  
  
 + --- //[[oemb1905@jonathanhaack.com|oemb1905]] 2019/11/09 16:00//
computing/gitserver.1547407471.txt.gz · Last modified: 2019/01/13 19:24 by oemb1905