GitHub: Transfer UMN Repositories to a Github.com Personal Account

This article contains the steps to transfer GitHub@UMN repositories (also known as "repos") to an account that is not hosted by UMN (such as a personal Github.com account).

  • If you still have access to GitHub@UMN, you can follow these steps to transfer appropriate content out of your private UMN account to a personal (public) github.com account.
  • If you are a student, staff, faculty, or other UMN community member and are leaving the University system, you will no longer have access to any repos via github.umn.edu. See What happens to my repositories when I leave the University? for more information about account end-of-life policies for GitHub@UMN. 
  • If you no longer have access to GitHub@UMN and need to retrieve your repos, you can contact Technology Help for further assistance. 

 

Complete all sections in the order listed below:

Creating a Personal Repo
Cloning or Downloading UMN Repo
Changing Remote Repo
Confirming Changes with Git Push

Creating a Personal Repo

You will first need to set up a repo under GitHub's consumer service.

 

  1. Create a free github account with a personal email if you don't already have one.
    • Public* github.com repos are free.
    • If you require a private repo, you'll need to sign up for a paid plan.
    • *Note: "Public" repos on github.umn.edu are visible only to those with UMN GitHub accounts. "Public" repos on github.com are visible to everyone.
    • To ensure you are not sharing content or materials that should not be public, follow the Source Code Management: Use Guidelines.
  2. Create a new repo with your github.com account.

Cloning or Downloading UMN Repo

After setting up your personal/consumer GitHub account and repo, clone (download) your UMN repositories to your computer. 

  1. Clone your UMN GitHub repo on a local computer.
    • If you already have a local repo cloned, make sure it is up to date by running a pull command.
  2. Authenticate with your UMN credentials if prompted.

Changing Remote Repo

Once you have your repos cloned onto your computer, you must repoint them to your consumer/personal GitHub account. 

  1. Navigate into the local repo via command line interface.
  2. Display the current remote to see that the local repo currently points to a github.umn.edu remote URL:
    git remote -v
    • The following will be returned to indicate that github.umn.edu is the current remote repo:

      origin https://github.umn.edu/user/repository.git (fetch)
      origin https://github.umn.edu/user/repository.git (push)

       

  3. Remove the remote that points to github.umn.edu:
    git remote rm origin
  4. Add a remote in your local clone using the URL of your new, personal github.com repo:

    git remote add origin https://github.com/user/repo.git
  5. Display the current remote to confirm that it is now using a github.com URL:
    git remote -v
    • The following will be returned to indicate the current remote:
      origin https://github.com/user/repository.git (fetch)
      origin https://github.com/user/repository.git (push)

Confirming Changes with Git Push

After repointing your local repos to your consumer account, you can save your changes by pushing them to GitHub. 

Note: When pushing your code, use your personal github.com credentials if asked to authenticate€”not your UMN credentials

From your local repo, do one of the following:

  1. Push your repo to the new remote you just created:
    git push origin master
  2. Or, push your repo to a different branch:
    git push origin [branch-name]

Additional Resources

Information about using Git and GitHub in general can be found at the Git-SCM website and the GitHub website. Contact Technology Help for assistance. 

 

 

Last modified

Changed

TDX ID

TDX ID
3686