1

I was added as a member to a private repo. I visited the repo page and copied the git repo address: https://github.com/xxxxxxx/xxxxxxxx.git

I then entered the following into the terminal:

git clone https://github.com/xxxxxxx/xxxxxxxx.git

I edited some files and created a new local branch:

git checkout -b new_branch

I then added the changes, and committed them:

git add -A
git commit -m 'Commit message here'

Next, I tried to push the changes to the repo in order to create a new remote branch:

git push -u origin new_branch

I also tried:

git push origin new_branch

Both failed to push the changes and displayed the following error message:

remote: Repository not found.
fatal: repository 'https://github.com/xxxxxxx/xxxxxxxx.git/' not found

I found this page on Github(https://help.github.com/articles/error-repository-not-found/) which addresses the error message I am seeing, but the repo is spelled correctly, I am a member of the team that has access to it(I cloned it in the first place), and I am not using SSH, so none of those apply to me.

Any ideas why I am not able to create a remote Github branch based on my local branch?

zeckdude
  • 15,877
  • 43
  • 139
  • 187
  • 1
    found [this](http://stackoverflow.com/a/10235016/2723675) it seems like if you don't have write permissions when trying to push it returns the same `Error: Repository Not Found` message . – iLoveTux Oct 24 '15 at 03:33
  • Thanks! Is there any way I can personally check if I have read-write access or do I need to ask the admin? – zeckdude Oct 24 '15 at 03:34
  • If you browse to the repo (in github's web gui), select a file, and click the edit link (shaped like a pencil) and try to "save" (actually I think it commits and offers to let you create a pull request) the changes. You should find out quickly if you have write permissions. – iLoveTux Oct 24 '15 at 03:36
  • One of the options for "saving" is `Create a new branch for this commit and start a pull request.`, this may fit in better than just making a random change to someone's private repo. – iLoveTux Oct 24 '15 at 03:39

1 Answers1

1

Found this.

It seems like if you don't have write permissions when trying to push, GitHub returns the same Error: Repository Not Found message.

Community
  • 1
  • 1
iLoveTux
  • 3,552
  • 23
  • 31