For example, I developed it locally, push it to GitHub, and then I have to go to the server git pull
Is there a way to simplify the process? GitHub repository automatically git pull when a push server is available.
With hooks? How to use it?
Reply content:
For example
For example, if I develop locally and push it to github, then I have to go to the server to gitpull. Is there a way to simplify this process? The github repository automatically uses hooks when there is a push server? How to use it? For example, if I develop locally and push it to github, I have to go to git pull on th
-project.gitInitialized Empty Git repository in/project/my-project.git/Warning:you appear to has cloned an empty repository.[Email protected]/]# tree/project/my-project.git//project/my-project.git/├──branches├──config├──description├──head├──hooks│├──applypatch-msg.sample│├──commit-msg.sample│├──post-commit.sample│├──post-receive.sample│├──post-update.sample│├──pre-applypatch.sample│├──pre-commit.sample│├──p
files, But the production server is prompting me to delete these two files. Faint feeling, may have relations with authority. So, I changed the permissions of the project folder to 777, and then git status doesn't happen.4. configuration file. git/config[Core]repositoryformatversion = 0FileMode = TrueBare = FalseLogallrefupdates = TrueQuotepath = False[Receive]D
SVN doesThe SVN version number is actually a source code snapshot of any corresponding time. Git does not have such a global version number, which is also the biggest feature missing by git.
The content integrity of git is better than that of SVNGit uses the SHA-1 hash algorithm for content storage. This ensures the integrity of the Code content and reduces the
SVN doesThe SVN version number is actually a source code snapshot of any corresponding time. Git does not have such a global version number, which is also the biggest feature missing by Git.
The content integrity of Git is better than that of SVNGit uses the SHA-1 hash algorithm for content storage. This ensures the integrity of the Code content and reduces the
machine:Install Gitolite software on the git-server git Remote repository (ip:10.0.0.11) machine to manage Git repository accountsInstall git in git-server
-keygen-t RSA#scp ~/.ssh/id_rsa.pub [Email protected]:~/Service side view the key that has been uploaded: LS ~/id_rsa.pub4. Generate GIT users on the server, use git user and initialize GitosisAdd user git:#useradd-R-s/bin/sh-c ' git
How to install and build Git Server using Gitosis in CentOS 6.3
Git, as a distributed version control system, generally communicates with servers over the ssh protocol when using git. The main advantage of using ssh is that it is fast (data is compressed before transmission, faster than HTTP), secure, and easy to read
How to build your own Git ServerGuideNow we will learn how to build a git server, how to write custom Git hooks to trigger corresponding actions (such as notifications) in a specific event, or publish your code to a site.
Till now, we mainly discuss how to interact with
/gitosis $ sudo chmod 700/home/gitrepository/
Gitosis stores the repository in the user's repositories directory by default. For example, the git user's repository address is in the/home/git/repositories/directory by default, here we need to create a link ing. Let him point to the repository directory/home/gitrepository that we created previously for storing the project.
Ubuntu:/tmp/gitosis $ sudo ln-s/home
configurations of git are started below.
2. Create a git Administrator Account and configure git
Create an account (git) as the administrator of the git server and manage project permissions of other users.
Ubuntu:/tmp/gitosis $
remote repository and runs it on your computer:
$ git clone git@server:/srv/sample.gitCloning into 'sample'...warning: You appear to have cloned an empty repository.
The rest of the push is simple.
Manage public keys
If the team is small, collect everyone's public keys and place them on the serverThe/home/git/. ssh/au
read and write access to each branch or even under each directory. Because Git was developed for Linux source code hosting, Git also inherits the spirit of the open source community and does not support permission control. However, because git supports hooks, it is possible to write a series of scripts on the
pub_path/id_rsa.pub $ {server_ip}: id_rsa.pub. Here we use the direct USB flash drive COPY method.
(2) initialize gitosis
Go to the directory of the copied id_rsa.pub: CD/tmp
Sudo chmod 777 id_rsa.pub
Sudo-H-u git gitosis-init
At this point, some directories will be generated under the/home/git directory, If you want others to be able To clone the gitosis-admin.git, you need to do the following:
Sudo chmo
: 00a @ Ubuntu:/tmp/gitosis $
Sudo chmod A + R/tmp/id_rsa.pub to run gitosis:
A @ Ubuntu:/tmp/gitosis $
Sudo-H-u git gitosis-init Initialized empty git repository in/home/prj_git/gitosis-admin.git/
Reinitialized existing git repository in/home/prj_git/gitosis-admin.git/gitosis the interesting thing is that it manages the configuration file through a
a git repository, you need to use the client side to clone it and modify the commit to take effect.
git clone ssh://git@127.0.0.1:26732/gitosis-admin.gitRun the git command to clone gitosis-admin. here you need to pay attention to the port problem (this port is the s
Authorized_keysWe then give the post-update a writable permission so that the client can commit the changes.Yourname:gitosis git$ sudo chmod 755/users/git/repositories//gitosis-admin.git/hooks/post-updatePassword:Yourname:.ssh git$ CD ~yourname:~ git$ CD repositories/Yourna
1. Install Jdk-8u172-windows-x64.exe, install with default settingsTwo JRE:C:\Program FILES\JAVA\JDK1.8.0_172\JRE: Dedicated JRE for running the tools contained in the JDK without registry settings.C:\Program files\java\jre1.8.0_172: Public JRE, which can be used by other Java applications, is registered to the registry (Hkey_local_machine\software\javasoft) and the browser.2. Configure Java Environment variablesJava_home:c:\program files\java\jdk1.8.0_172CLASSPATH:.; %java_home%\lib;%java_home%
the test machine and upload the key to the git repository,
[Root @ node1 ~] # Useradd-d/opt/user1 user1[Root @ node1 ~] # Echo "user1" | passwd -- stdin user1Change the password of user1.Passwd: All authentication tokens have been successfully updated.[Root @ node1 ~] # Useradd-d/opt/user2 user2[Root @ node1 ~] # Echo "user2" | passwd -- stdin user2Change the password of user2.Passwd: All authentication tokens have been successfully updated.[Root @ n
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.