I 've been pulling code from the company's server using repo sync. Today, I'm empty. I also want to try setting up a repo server on my local machine.
I searched for a bunch of tutorials online... Many of them are copy files. After a long time, they have finally succeeded. Ubuntu12.04.
1. I have written an article abou
/gitadmin/.ssh/id_rsa.pub, copy the id_rsa.pub to the-end of the TMP directory:SCP ~/.ssh/id_rsa.pub [Email protected]:/tmp/id_rsa_gitadmin.pubb) Execution Gitosis-init (end a)Cd/tmpsudo chmod 777 id_rsa_gitadmin.pubsudo-h-u git gitosis-init At this point, some directories are generated under the/home/git directory, and if other users need the clone Gitosis-admin.git permissions, you need to do the followin
fe: 5b: df: 4d: ee: d2: e9: ed: 2c: e1: df: eb: ed: da: 84: 7e.
Are you sure you want to continue connecting (yes/no )? Yes
Warning: Permanently added '192. 168.40.128 '(RSA) to the list of known hosts.
Root@192.168.40.128's password:
Id_rsa.pub 100% 397 0.4KB/s
3) generate a Git user on the git Server
[Root @ Git ~]
Do web development, used to write a new feature to publish to the server is the use of FTP upload overwrite the original code, this is very troublesome, first to open the FTP program, then enter the specified folder, and then upload, And with FTP upload often error always have an individual file due to permissions or a variety of wonderful reasons upload failure ... There's no such thing as using Git to dep
change the path to meet your requirements. This command checks the current repository to the defined working directory without any version control data.
Add executable permissions to files:
Chmod + x post-receive
On your local end, clone the library as usual and use the tool you choose, and add a new remote real-time server (remember to change the server details to your Web
Use git to download the project and deploy it on the local and remote servers.1. Configure Git1. download and install 2. After installation, right-click the desktop and select three more branches.
3. git clone code from git: 1> specify the url and directory (usually a workspace). If Branch is not entered, the master is
Automatically deploy the GIT project deploy. PHP using a php script
Simple PHP Git deploy script
Change the SECRET_ACCESS_TOKEN from it's default value!"); } ?> Checking the environment ... Running as
.
BACKUP_DIR `%s` does not exists
@192.168.103.10:/tmp #上传公钥到服务器 (default SSH port 22)OrScp-p 3600 ~/.ssh/id_rsa.pub root@192.168.103.10:/tmp
5, build git user on the server, use git user and initialize Gitosis
The code is as follows
Copy Code
Adduser-m gitSu–gitGitosis-init #显示以下信息即表示成功#Initialized Empty Git repo
Configure the GIT server on Ubuntu
Over the past few days, I have been tossing over the GIT version management server. I feel a little too large, and I don't have enough permissions. The encrypted file does not match the user name ......
However, this afternoon has always been an effective task. I will record the error
/gitosis-admin.git or # git clone SSH: // [email protected]: 8200/gitosis-admin.git # modify the configuration file, you can omit each input port Vim ~ /. Ssh/config # modify the client ~ /. In the ssh/config file, add the following code: Host www. domain. comhostname www. domain. comport 8200 # after modification, the client can be connected in the following way # git clone SSH: // [email protected]/gitosi
convenient. For example: Right-click under D:\hjj-repo10) TestingEnter "Git version" in the command line that appears, the following content is the installation success;1.2.2Gitblit Installation1) Direct decompression, catalogue optional;2) configuration gitblit.properties;A. Path: Gitblit directory/data/gitblit.properties, "notepad" open;B. Locate the Server.httpport, set the port number for the HTTP protocol (e.g. 7070)Server.httpsport, set the por
-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 version control '-d/home/
/git/repo. gitgit push origin master # This will synchronize to the server
Others need to synchronize
# Clone and push: git clone git @ your_host_name:/home/git/repo. gitcd repovim READ
@localhost ~]$ su - git3. Install gitolite as a git service management tool. It authenticates users through the public key and can use the configuration file for fine-grained repo authorization management. Because it adopts SSH Public Key Authentication, ssh must be installed first.
[test@localhost ~]$ sudo yum install ssh[test@localhost ~]$ sudo service sshd start[test@localhost ~]$ sudo chkconfig sshd on
Reprinted: Ubuntu computer (Virtual Machine), which has an independent IP address in the company's LAN, and ensures that everyone in the team can ping;
Software requirements: Install git and OpenSSH on Git-core, gitosis, OpenSSH-server, and openssh-client:
A @ Ubuntu :~ $
Sudo apt-Get install Git-core
A @ Ubuntu :~
/*gitolite-admin/conf:total 4-rw-r--r-- 1 root root 77 Jul 22 15:10 gitolite.confgitolite-admin/keydir:total 4-rw-r--r-- 1 root root 393 Jul 22 15:10 git-admin.pub[[emailprotected] ~]# cat gitolite-admin/conf/gitolite.conf repo gitolite-admin RW+ = adminrepo testingRW+ = @allFirst of all gitolite-admin only admin has read and write permission, no one else can read and writeAnother code base t
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.