-1

I took a fork of master and master has received a few updates in the meantime that I now want to pull into my fork. So what I did was: cloned the fork to local disk, went into the dir and used git remote add upstram http://xx.xxx.xxx.xxx:pppp/path/to.git to add the master as upstream repo. Then a git fetch upstream gives me:

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.

and I do have a clone of that master repo on my disk too so I sure have read access. What's the problem here?

Thank you!

aynber
  • 22,380
  • 8
  • 50
  • 63
stdcerr
  • 13,725
  • 25
  • 71
  • 128

3 Answers3

4

Sorry for replying this way, but I cannot comment.

Did you notice your command is: git remote add upstram http://xxx.xxx.xxx.xxx:pppp/path/to.git

"upstram" not "upstream"?

I believe this could be the problem...

If you're not familiar with the command already - run "git remote -v" to see the remotes.

stdcerr
  • 13,725
  • 25
  • 71
  • 128
Shani C
  • 166
  • 6
0

In your command to add the remote you named upstram, not upstream. Check the name of your remotes: git remote show

eftshift0
  • 26,375
  • 3
  • 36
  • 60
0

As I think you want to connect your local git repo with remote repo, here is my advice, considering using:git remote set-url origin [your remote git repo url] this is for changing your git remote repo link refs.

For a new local git repo you should use:git remote add origin [your remote git repo url]

I hope that would helps you.