0

I created a new project in intelliJ from a git repo. Like so

file->new project->from version control -> git

I put in the repo address and all is well. the code downloaded and it's all up to date.

I created a new branch in intelliJ

VCS->git->branches->remote branches -> origin/master -> checkout as -> "my_new_branch_name"

The only change I've done is add a .gitignore file.

I made a commit doing

VCS->commit 

and it looks ok. Now when I try to push to the repo it fails with an error

Push Failed Failed with error : repository 'https//github.com/organization/my_repo.git/' not found

Not sure how this is possible since I just created the project from that exact link.

alex
  • 1,905
  • 26
  • 51
  • You should have added the repo with its ssh url. – Clijsters Aug 15 '18 at 13:51
  • Hmm. I just tried this and I first get a message asking if I want to "...add this host to a known hosts database?" So I click "Yes". I then get an "Invalid Remote" error "Remote URL test failed: Could not read from remote repository." – alex Aug 15 '18 at 14:03
  • What was the exact url you tried? – Clijsters Aug 15 '18 at 16:31
  • UPDATE: It wasn't the url or ssh url. I had to ask the owner of the repo for WRITE access as I only had read access. I was able to push after that. – alex Aug 15 '18 at 18:38

1 Answers1

1

The repository not found error on GitHub basically means the account you are authenticated with does not have permissions to access this repo for the particular operation. It is rather generic and the actual reason can be different.

If the repo you cloned is a public one, no authentication is required to clone, so anyone could do this. To push, authentication is required, and permission to write to the repo.

So, double check the account you use to connect to the repo is correct and has the permissions

Dmitrii Smirnov
  • 7,073
  • 1
  • 19
  • 29