Recently due to the development requirements, need to deploy a git server in the company, at the beginning of the choice, I intend to use gitolite to manage Git, later found that gitlab this system more convenient, it supports both SSH and HTTP mode, It's very practical for users to be able to submit their own code through the command line or even the web.Gitlab is a ruby-based open source project that implements the functionality of the Git repositor
1. Generate a key on your computerssh-keygen-t rsa-c "[email protected]"2, two files Id_rsa and id_rsa.pub are generated in the ~/.ssh directory in the Ubuntu system. The private key is saved in Id_rsa, and the public key is saved in Id_rsa.pub. 3, open id_rsa.pub, in Gitlab add key to the copied content can be addedError encountered: Fingerprint cannot be generated translation: Fingerprint cannot be generatederror Reason: Because the VIM editor has s
When the warehouse on the Gitlab is used with Jenkins, permissions fail and inaccessible situations such as printing the following information are always present:
Started by user Lhy building in workspace/usr/share/tomcat8/.jenkins/workspace/zxpm > Git rev-parse--is-inside-work- Tree # timeout=10 fetching changes from the remote git repository > git config remote.origin.url git@192.168.1.2:web/z Xpm.git # timeout=10 fetching upstream changes from Gi
1, the new project on the Gerrit;
2, Gerrit project configuration permissions (here not code):
reference:refs/*
Push Annotated tag
push signed tag
Forge committer Identity
Create Reference
Read
Push
3, the Gitlab project cloning to local;
4. Navigate to the directory of the Gitlab project and use the command to change the remote warehouse path to the Gerrit Project warehouse path:
git remote Set
In the creation of the project, forget to add gitignore, resulting in node_module and other such tools directory uploaded to Git, so that the directory structure of remote git look cluttered, hurriedly use Gitignore, mend, not late.Tracking status of locally deleted filesgit rm -r --cached .Create a new. gitignore fileAdd the directory name you want to filter to the. gitignore fileRe-add tracking of filesgit add .Finally commit, you can submitHow to use Gitignore to filter uploaded directories o
1. Login JekinsPrerequisite: Jekins has been deployed and can log inVersion: Jenkins2.60.2Http://IP: Port/jenkins/view/all/newjob2. Create a new Build taskSelect the type of project, select "Build a multi-configuration item" and enter the custom project name, click OKCode Management Choose Git (need to click Add to add a viable account password)Note: If you do not involve code operations, such as only shell script execution, you can skip this stepChoose a Build cycle (choose manual build here)Se
deleted the file. if I need to start from Origin/master, local changes will not move, how to operate. getting data from the serverGit fetch origin A new branch (such as Serverfix) on the basis of a remote branch.Git checkout-b serverfix Origin/master continues to develop on Serverfix 4. You will use: undo changes git-contribute to the project GIT branch-remote branch git ssh How to use: First in local Generate SSH key:ssh-keygen-t rsa-b 4096-c "your_email@example.com", and then in the
1. Follow the instructions to generate the Key file.
2. Add the public key to the Gitlab SSH Keys. (on user profile page)
3. Test
Note: When SSH first connected to the server, there will be RSA password fingerprint confirmation, enter Yes accept, the connection will not appear after the confirmation prompt. The following figure.
The fingerprint string that appears here, such as 6c:2b:ae:af:8e ..., differs from the fingerprint string of the p
branches, tags, or commits
List all the Contributors
6. Commits: Can be managed in the following ways
List all the commits for a repository
Get a single commit
Get the difference for a single commit
7. Branches: Can be managed in the following ways
List, get, create, protect, unprotect, and delete branches
8. Merge requests: Can be managed in the following ways
List all the merge requests
Get, create, edit, accept, and close merge reques
key we want to use.3. Add and configureconfigFile additionsconfigFileIf config the file does not exist, add it first, and then modify it directly.touch ~/.ssh/configInconfigFile, add the following content (UserIndicates your user name)Host *.cloudscape.sohu.com IdentityFile ~/.ssh/id_rsa.sohu User test==============================================================================================#Default GitHost defaultgitHostName IP Address #域名也可User thinkIdentityFile ~/.ssh/id_rsa#Second Git
1. See if you already have an SSH key: CD ~/.sshIf there is no key then there will be no such folder, there is a backup to delete2. Survival key:
$ ssh-keygen-t rsa-c "your Mailbox"Press 3 to enter, the password is empty.
Your identification has been saved In/home/tekkub/.ssh/id_rsa.Your public key has been saved in/home/tekkub/.ssh/id_rsa.pub.The key fingerprint is:..................
Finally, two files were obtained: Id_rsa and Id_rsa.pub3. Add the SSH key on GitHub, which adds t
': Server certificate verification failed:certificate has Expir Ed, certificate issued for a different hostname, issuer was not trusted (https://*****)This is because when Sourcetree creates a new warehouse, it checks for SSL when cloning from a URL, such as: Is that you set the "Prohibit SSL check" in the settings. solution, use the command line clone project, and then add the existing local repository by adding it. Git Global Settingsgit config--global user.name "Guo Hongjun" git conf
A GitLab platform vulnerability in Hang Seng leaked a large number of sensitive engineering source code.
RtDetailed description:
Http: // 60.191.25.162: 5222/users/sign_inRegister an account and log on
The source code of the Internally shared project can be seen directly.
Proof of vulnerability:
There are alipay interfaces, Ali payment interfaces, a large number of sensitive code
Solution:
The internal platform should be placed in the inter
First of all, explain the reason: these days in testing their own written interface, the company's project is the form of back-and-forth separation, so I want to clone the front-end code to local, with my local database to test.
However, I found that Gitlab was the three branches under the project, one of which was the front-end code, which knocked me out ...
So again through the network search, and finally a little bit of harvest, in order to preven
The article is from copy. But it didn't work out. After the 5th step, I add the content. It's my pleasure to help you.Preparatory work:
Create a new project in Github/gitlab audit
1. Initialize the local repository in the local directory zhunions directory
Git init
2. Create a. Gitignore readme.md file
3. Local Submissions
git Add.
Git commit-m "First commit"
4. Add a remote association
Git remote add Origin git@172.16.10.9:namespace/zhunions.git
Phenomenon, internet packet sending, traffic surge
Is gitlab secure?
[20:20:49] Warning: Network TCP port 6667 is being used by/var/tmp/lib/init. Possible Rootkit: Possible rogue IRC BotUse the 'lsof-I 'or 'netstat-any' command to check this.[[Email protected] ~] # Ls-Al/var/tmp/lib/init-Rwxrwxr-x 1 git 190910 Jul 3/var/tmp/lib/init
Solution: first shut down the Internet, view the process, and find two suspicious processes. Download rkhunter and sc
After installing the Gitlab, in order to better manage, we generally need to turn off the user registration function.Practice:Remove the sign-up enabled tickAdmin-->settings--sign-in restrictionssign-upenbaled Closing the registration functionSign-inenbaled to close the sign-in functionLogging in again has turned off the registration feature.User registration requires an administrator to generate a userNew User-SaveLogin Mailbox Settings Password*****
To create a new project with Gitolite, the first push after clone may appear:$ git push No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as ' Master '. Fatal:the remote end hung up unexpectedly error:failed to push some refs to ' file:///xxxxxxx.git ' this isGitI can't find the version you're submitting. Workaround:git push Origin master
$NBSP;GITNBSP;PUSHNBSP;NBSP;
Norefs in common and none specified;doingnothing.
Perhaps Youshou
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.