0

I simple cloned a project using github copy & paste repository url, created new branch:

git checkout -b <branch>

added and commit changes, then pushed with -u flag:

git push -u origin <branch>

exactly how describe here

and I get:

remote: Repository not found. fatal: repository 'https://github.com/companyUsername/MyRepo.git/' not found

never happened before...so weird :/

JohnBigs
  • 2,327
  • 3
  • 25
  • 52

1 Answers1

0

Problem: Wrong origin

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

Check your URL as it's in the form https://github.com/username/repository.git. You omitted your username. You can remove and re-add your origin like this:

git remote rm origin
git remote add origin "https://github.com/username/repository.git"
pentix
  • 642
  • 9
  • 20
  • edited my question, in the actual action i didnt omitted it – JohnBigs Aug 01 '17 at 19:36
  • Is it a private repository? Have you tried to copy the displayed clone URL when you setup the repository? – pentix Aug 01 '17 at 19:37
  • it is private repository. yeah i did copy it and in my console went `git clone https://github.com/CompanyUser/RepoName.git` – JohnBigs Aug 01 '17 at 19:43
  • I imagine GitHub throws you an 404 error because you don't have sufficient permissions. Have you checked your user is added properly as an Contributor in the Repository settings page? – pentix Aug 01 '17 at 19:45
  • but if i checkout to master and go `git pull` i get a response...dosent it mean I have access? – JohnBigs Aug 01 '17 at 20:01
  • As I don't use GitHub using private repositories I'm unsure whether you're able to set read/write permissions maybe? What messages do you get? – pentix Aug 01 '17 at 20:05