Elegantly handle Git multi-account and proxy issues

Original link: https://www.iots.vip/post/elegant-solution-git-multiple-accounts-proxy-issues.html

wechatpay.png

At work, it is often easy to encounter scenarios where one computer uses multiple Git accounts. For example, the account company account is for work, and the account personal is for personal use. Since Git itself does not have a multi-account mechanism, we cannot distinguish which warehouse uses which account under the default settings. At the same time, in some well-known scenarios, we cannot directly access the Github repository, and need to go through a layer of proxy to speed up our code pull and push speed. This article will use SSH config to solve these problems relatively elegantly.

This article is transferred from: https://www.iots.vip/post/elegant-solution-git-multiple-accounts-proxy-issues.html
This site is only for collection, and the copyright belongs to the original author.