In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Background
When using git, we all face the problem of multiple accounts. The most common problem is the company's internal gitlab and the open source platform github. We all need to use it on the same computer at the same time, which needs to solve two problems.
Git multi-account configuration
Git config-global user.name sets the global user name
Git config-global user.email Design Global Mailbox
The git config-global setting works on all git repository by default. When we git clone the repository of gitlab and github respectively, we need to set the user.name and user.email of the current warehouse for the repository under each git clone.
For this question, please refer to my git series-> talk about the precautions before using git.
Ssh multi-key pair configuration
We all know that git is based on the ssh protocol, and git establishes remote links and authentication through ssh agent.
Ssh is encrypted and transmitted to git server through the rsa private key, and git server decrypts it by finding the corresponding rsa pub key to verify whether the legal information is currently submitted.
We create different rsa key pairs through ssh-keygen. If you have not specially handled the private key pairs within the company, the default names are id_rsa and id_rsa.pub.
If this is the first time we have created a git account, we can simply default the creation process for the first time
Ssh-keygen-t rsa
Enter enter all the way, then configure the gitlab within the company, and submit normally.
Then create it with another name through ssh-keygen, such as github and github.pub, which is no different from creating the default id and id.pub.
Then add the newly created github private key to the ssh-agent cache through ssh-add.
Ssh-add / .ssh/github
Then look at the list of ssh agent keys cache.
Ssh-add-l
Then configure the github.pub public key to our github account.
Then you can use gitlab and github normally. If you are worried about the confusion of the two key, you can remove one of the key from the ssh agent.
Ssh-add-d ~ / .ssh/github
Then try the git push code, and if it's good, it's right.
Thank you
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.