Stronghold
HomeServicesDocumentationBlog
  • Highly Secure Computing (Stronghold)
  • Data Management
    • SFTP Data Transfers
      • Data Imports
      • Data Exports
    • HTTPS Direct Downloads
      • FastX 3
      • FastX 2
    • Data Storage
    • Globus Transfers
      • Windows Tenants
      • Adding New Users
  • Usage
    • New Tenant Onboarding
    • Windows Environments
      • Access from Mac
      • Access from Windows
      • RDP Gateway from Mac
      • RDP Gateway from Windows
    • Linux Environments
      • FastX 3
      • FastX 2
  • Software
    • Windows Standard Software
    • Linux Standard Software
      • Julia
    • Package Archive Mirrors
      • BioConductor Mirror
      • CRAN Mirror
      • PyPI Mirror
    • Install R/Python Packages from Local File
    • Jupyter Lab on Linux Workstations
    • Changing the temporary folder for softwares
      • SAS
      • STATA
      • RStudio
    • Changing Default Package install locations on Windows
      • Python (Pypi packages)
      • R (CRAN Packages)
      • Stata packages
  • Git
    • Git Sync
    • GitLab
  • Access & Security Groups
    • User Groups
    • Lifespan Staff Access
  • Multi-Protocol Access
    • Access Same Data from Windows and Linux Workstations
Powered by GitBook
On this page
  • Overview
  • Instructions
  • Public Repo
  • Private Repo

Was this helpful?

  1. Git

Git Sync

Overview

Git sync allows users to update their local repositories in Stronghold with both public and private remote repositories through the transfer server. After creating a remote repository and uploading code to it, the user can clone it to their Stronghold environment and automatically have future changes pulled to their local repo. Here's how it works:

  1. Create a "newrepo" file with information about your repository

  2. Copy the "newrepo" file to the transfer server of your tenant

  3. Clone the repo from transfer server

    • Please note that the repo is cloned to your current directory and is public to anyone with access to the directory

  4. Pull most recent commits

Git Sync only allows users to clone and pull repositories. Commits cannot be pushed to the remote repos.

Instructions

Public Repo

1. Create "newrepo" File

Create a text file named "newrepo" without a file extension on your computer. This file should be a single line with two parameters: the name of your repo and a Git URL (https:// or ssh://).

Example:

<repo name> <git url>

2. Send "newrepo" File to Transfer Server

NOTE: It may take 15+ minutes for the repo on the transfer server to sync with the external repo.

3. Clone Repo

On the Stronghold workstation, navigate to the directory you want to clone the repo into and git clone from the transfer server. The URL should be formatted with “git://”

Syntax:

git clone git://<tenant>-xfer.stronghold.brown.edu/<repo name>

Where <tenant> is your Stronghold tenant and <repo name> is the same value as the first parameter in the "newrepo" file you made.

4. Pull Repo

You can pull new commits by navigating to the repo on your stronghold workstation and doing a git pull.

NOTE: It may take 15+ minutes for the repo on the transfer server to sync with the external repo.

Private Repo

1. Create Private Key File

Create a text file that contains ONLY the private key for your private repo. The name of this file can be whatever you wish because the "newrepo" file will specify this file name. A private key looks like:

starts with:

-----BEGIN OPENSSH PRIVATE KEY-----

and ends with:

-----END OPENSSH PRIVATE KEY-----

2. Create "newrepo" File

Create a text file named "newrepo" without a file extension on your computer. This file should be a single line with three parameters: the name of your repo, a Git URL (ssh://), and the name of the private key file you made in the previous step.

Syntax:

<repo name> <git ssh url> <private key name>

Example:

my_repo ssh://github.com/my_project/my_repo.git my_private key

3. Send Private Key File File to Transfer Server

4. Send "newrepo" File to Transfer Server

NOTE: It may take 15+ minutes for the repo on the transfer server to sync with the external repo.

5. Clone Repo

On the Stronghold workstation, navigate to the directory you want to clone the repo into and git clone from the transfer server. The URL should be formatted with “git://”

Syntax:

git clone git://<tenant>-xfer.stronghold.brown.edu/<repo name>

Where <tenant> is your Stronghold tenant and <repo name> is the same value as the first parameter in the "newrepo" file you made.

6. Pull Repo

You can pull new commits by navigating to the repo on your stronghold workstation and doing a git pull.

NOTE: It may take 15+ minutes for the repo on the transfer server to sync with the external repo.

PreviousStata packagesNextGitLab

Last updated 1 year ago

Was this helpful?

The repo file should be uploaded to the transfer server using the instructions found in the documentation. Upload the file from your local computer to the /import/<username> directory on the transfer server. The transfer server will download the public repo and perform a virus scan on each file in the repo.

The private key file should be uploaded to the transfer server using the instructions found in the documentation. Upload this file to the /import/<username> directory.

The repo file should now be uploaded to the transfer server using the instructions found in the documentation. Upload this file to the /import/<username> directory. The transfer server will download the private repo and perform a virus scan on each file in the repo.

SFTP Data Transfers
SFTP Data Transfers
SFTP Data Transfers