git:// protocol blocked by company, how can I get around that?

前端 未结 7 880
醉话见心
醉话见心 2020-11-28 00:26

Attempting something like git clone git://github.com/ry/node.git will not work, it results in:

Initialized empty Git repository in /home/robert/         


        
7条回答
  •  难免孤独
    2020-11-28 00:50

    Introduction

    I will add here my own approach ( which is not required if you have a publicly accessible git repository that supports https).

    I work at a company where the git repository is only accessible from inside the company. But I also work from home.

    How do I push to the company repository from home?

    I have created a repository with a folder on my google drive. Except for git, and https, you can include repositories as paths.

    So, instead of pushing to origin I push to "gDrive". This causes the folder to synch from my home workstation to google drive, and then my work computer pulls the changes. Additionally, since sometimes files in the ".git" directory don't synch, I rename the folder temporarily from e.g. "trunk" to "trunk2". This forces both home and work computers to be 100% synched with google drive.

    I then log-on to my work computer either through checkpoint-vpn remote ( or teamviewer) and push my updates to the work git repository.

    Additionally, the process would work vice-versa for pushing to a git repository outside the company that is blocked.

    1. Push from workstation git repo to folder in google drive.
    2. Force 100% synch by temporarily renaming project directory in gDrive.
    3. Access home computer through some kind of remote and push changes.

提交回复
热议问题