search
HomeBackend DevelopmentPHP TutorialDetailed introduction to dual git configuration
Detailed introduction to dual git configurationJan 29, 2018 am 10:58 AM
introducedetailedConfiguration

This article mainly shares with you the weird dual git configuration, hoping to help everyone.

Due to actual development needs, the company uses Gitlab, and I use Github privately. I want to configure both on the company computer at the same time.
There are many tutorials on the Internet for this configuration. I followed this tutorial at first, but they all failed. In the end, I succeeded based on my own operation. Realized the coexistence of Github and Gitlab.

1. Configure your own Github

  • ##1.1. Under your own C:\Users\william folder , create a new .ssh folder through the command line tool mkdir .ssh;

  • 1.2, cd .ssh, through ssh-keygen -t rsa - C "My email address" generates a pair of RSA keys for your own github, enter all the way until the end is successful

  • 1.3, and then add the .ssh file Open the id_rsa.pub file in the folder, copy the contents and add it to the ssh of the github web version

  • 1.4, through ssh -t git@github .com to test connectivity, where you can enter yes in Are you sure you want to continue connecting (yes/no)?

2. Configure yourself Gitlab

  • 2.1, basically based on the company's configuration document, the basic operation is the same as above

3. Summary and Thoughts

##3.1 Summary

  • 3.1.1. Finally my. There are only config, id_rsa, id_rsa.pub, and known_hosts files in the ssh folder. Among them, I added the Github domain name pointing to the config file, otherwise the ssh -t git@github.com prompt failed.

  • 3.1.2. According to the online tutorials, they may not be suitable for your own company. The main variable is that each company may have certain environment variables when configuring Gitlab. The difference is reflected in the different contents of the config file in the final .ssh folder and the known_hosts file, mainly the config file. Therefore, you must explore according to your own company's situation and find a configuration path that suits your situation. I spent most of the day reading several online tutorials but failed.

  • 3.1.3. After github generates its own pair of RSA keys for github through ssh-keygen -t rsa -C "my email address", Enter file in which to save the key (C:\Users\william/.ssh/id_rsa): will let you choose a custom file name to save the key. If I do not enter, I will set my own custom file name, even if I put The generated public key was added to the SSH of the web page, and the final connectivity test failed. Of course, it cannot be cloned. It feels very strange.

3.2 Thinking

  • 3.2.1. Why do you customize Github? Does the last connectivity test of the key file name fail?

  • 3.2.2. Why is it that after Gitlab customizes the file name, the final file name is still the default id_rsa, strange! ! !

  • 3.2.3. There are only config, id_rsa, id_rsa.pub, and known_hosts files in the .ssh folder, but it can be connected to Github and Gitlab respectively. Indeed Very strange. You read that right, id_rsa and id_rsa.pub are only Gitlab keys, and Github ones are gone. Weird! ! ! !

  • Related recommendations:


[Git configuration skills] 01. Configuration file git config introduction

The above is the detailed content of Detailed introduction to dual git configuration. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
wapi是什么东西详细介绍wapi是什么东西详细介绍Jan 07, 2024 pm 09:14 PM

wapi这个名词用户们可能在使用网络得时候见到过,但是对于一部分人来说肯定都不知道wapi是什么,下面就带来了详细介绍,帮助不知道小伙伴去了解。wapi是什么东西:答:wapi是无线局域网鉴别和保密的基础结构。这就像红外线和蓝牙等功能一样,一般都覆盖在办公楼等地方的附近。基本都是为一个小部门所有的,所以这个功能涉及的范围只有几公里。wapi相关介绍:1、wapi是无线局域网里面的一种传输协议。2、这款技术是可以去避免窄频带通信的问题,可以更好的去进行传播。3、仅仅只需要一个代码就可以去传送信号了

详解win11能否运行PUBG游戏详解win11能否运行PUBG游戏Jan 06, 2024 pm 07:17 PM

pubg又称绝地求生,是一款非常经典的射击大逃杀类型游戏,从2016年火爆以来一直拥有非常多的玩家。在最近的win11系统推出后,就有不少玩家想要在win11上游玩它,下面就跟着小编来看看win11是否可以玩pubg吧。win11能玩pubg吗:答:win11可以玩pubg。1、在win11推出之初,因为win11需要开启tpm的缘故,所以导致很多玩家被pubg封号处理了。2、不过后来根据玩家的反馈,蓝洞方面已经解决了这个问题,目前已经可以在win11中正常玩pubg了。3、如果大家遇到了pub

Python函数介绍:exec函数的介绍及示例Python函数介绍:exec函数的介绍及示例Nov 03, 2023 pm 02:09 PM

Python函数介绍:exec函数的介绍及示例引言:在Python中,exec是一种内置函数,它用于执行存储在字符串或文件中的Python代码。exec函数提供了一种动态执行代码的方式,使得程序可以在运行时根据需要生成、修改和执行代码。本文将介绍exec函数的使用方法,并给出一些实际的代码示例。exec函数的使用方法:exec函数的基本语法如下所示:exec

i5处理器是否能装win11详细介绍i5处理器是否能装win11详细介绍Dec 27, 2023 pm 05:03 PM

i5是英特尔旗下的一系列处理器,拥有到现在11代i5的各种不同版本,每一代都有着不同性能。因此对于i5处理器是否能够安装win11,还需要看是第几代的处理器,下面就跟着小编一起来分别了解一下吧。i5处理器能装win11吗:答:i5处理器能装win11。一、第八代及之后的i51、第八代及后续的i5处理器是能够满足微软的最低配置需求的。2、因此我们只需要进入微软网站,下载一个“win11安装助手”3、下载完成后,运行该安装助手,根据提示进行操作就可以安装win11了。二、第八代之前的i51、第八代之

edge快捷键的介绍edge快捷键的介绍Jul 12, 2023 pm 05:57 PM

在如今快捷的生活,为了提高工作效率,快捷键是必不可少的工作需求。快捷键是指按键或按键组合,可提供另一种方式来执行通常使用鼠标执行的操作。那么edge快捷键有哪些呢?edge快捷键的功能又有哪些呢?下面小编整理了一份edge快捷键的介绍,感兴趣的朋友们快来看看吧!Ctrl+D:将当前页面添加到收藏夹或阅读列表Ctrl+E:在地址栏中执行搜索查询Ctrl+F:在页面上查找Ctrl+H:打开历史记录面板Ctrl+G:打开阅读列表面板Ctrl+I:打开收藏夹列表面板(测试好像不起作用)Ctrl+J:打开

详细介绍电脑中的打印机驱动程序位置详细介绍电脑中的打印机驱动程序位置Jan 08, 2024 pm 03:29 PM

很多用户在电脑上安装了打印机驱动程序,但却不知道如何找到它们。因此,今天我为大家带来了详细介绍打印机驱动程序在电脑中的位置,对于还不了解的用户,快来看看吧打印机驱动在电脑哪里找重新撰写内容而不改变原义时,需要将语言改写为中文,不需要出现原句首先,建议使用第三方软件进行搜索2、在右上角找到"工具箱"3、在下方找到并点击“设备管理器”。改写后的句子:3、在底部找到并点击“设备管理器”4、然后打开“打印队列”,然后找到你的打印机设备。此次是你的打印机名称型号。5、右键打印机设备,就能够去更新或者卸载我

PHP函数介绍:strtr()函数PHP函数介绍:strtr()函数Nov 03, 2023 pm 12:15 PM

PHP函数介绍:strtr()函数在PHP编程中,strtr()函数是一个非常有用的字符串替换函数。它用于将字符串中的指定字符或字符串替换为其他字符或字符串。本文将介绍strtr()函数的用法,并给出一些具体的代码示例。strtr()函数的基本语法如下:strtr(string$str,array$replace)其中,$str是要进行替换操作的原始字

玩游戏最好的win10版本介绍玩游戏最好的win10版本介绍Jan 08, 2024 am 10:41 AM

在微软公司发布了win10系统之后,我们所知的就有好几种版本:家庭版、教育版、专业版、旗舰版等等。小编认为这些版本在性能上没什么差别,只是有些针对性的功能不同。那么小编今天就来跟大家聊一聊玩游戏用win10哪个版本最好吧~希望可以帮助到你。玩游戏用win10哪个版本最好答:玩游戏来说,这几个版本其实区别并不大。如果只是想要拿来打游戏的话,推荐win10家庭版。因为家庭版没有其他花里胡哨的功能,能够让性能主要集中在游戏方面。这个问题,首先要说的就是win10几个版本之间的区别。1、win10主要版

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.