1

We have an internal GIT Server on an "airgapped" network with no out side connections.

I need to clone the Linux kernel onto the internal server in the closed area Confused with the steps.

Step 1: Clone kernel, git clone https:/some/place/on/network

Step 2 - Sneaker net into closed (private network) room.

Step 3: Using web page - create the repo on the internal server

(This server cannot clone directly - no connection)
Internal server = Similar to: Gitlab private, or BitBucket Private

Step 4: STUCK

  • I have an initialized repo locally
  • I have an initialized repo on the local server (nothing there matters)
  • I just am required to "create" it using the web server interface
  • I do not want to push ONE branch, I want to push all branches
  • I do not want to push "master" - I need to push all branches, all tags
  • The 'target' (internal server) has nothing useful, I want to replace all of it.

what is the git incarnation to push to the internal server? It escapes my google foo

When I try to search:

  • I get pages that talk about using the web-import feature which will not work in my environment.
  • or creating a new repo .
user3696153
  • 568
  • 5
  • 15

1 Answers1

3

To clarify the relevance of the duplicate question:

Your git repo by default has the remote origin, tied to the original server. You can add multiple remotes to your repo, so you can define a sneakernet remote to point to the other server.

You can list the remotes on your repo:

git remote -v 

origin  git@server1:path/to/some.git (fetch)
origin  git@server1:path/to/some.git (push)

Then add the new remote

git remote add sneakernet git@server2:path/to/some.git

You can then push a branch or tag to one server or the other depending on which computer you're using.

git push -u origin some/branch
git push -u sneakernet some/branch

The link with the duplicate question shows how to quickly push everything between servers.

Adrian J. Moreno
  • 14,350
  • 1
  • 37
  • 44