Skip to content

Setting the upstream for a fork

Simenhug edited this page Apr 16, 2018 · 2 revisions

When trying to sync a fork that does not have an upstream set you may get output that looks like the following:

$ git fetch upstream
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The way to overcome this issue would be to check that you have an upstream and the sync it. This can be done through the following:

$ git remote -v
Esri    https://github.com/Esri/developer-support.git (fetch)
Esri    https://github.com/Esri/developer-support.git (push)
origin  https://github.com/nohe427/developer-support.git (fetch)
origin  https://github.com/nohe427/developer-support.git (push)
$ git remote add upstream https://github.com/esri/developer-support.git
$ git remote -v
Esri    https://github.com/Esri/developer-support.git (fetch)
Esri    https://github.com/Esri/developer-support.git (push)
origin  https://github.com/nohe427/developer-support.git (fetch)
origin  https://github.com/nohe427/developer-support.git (push)
upstream        https://github.com/esri/developer-support.git (fetch)
upstream        https://github.com/esri/developer-support.git (push)

More information can be found at the following page: Configuring a remote for a fork