I have created a new repository in code.google.com
, generated the code.google.com
password and updated my ~/.netrc
with
machine code.google.com login <email-id> password <password>
As per the instruction in the code.google.com
, I was able to clone
the repository using the following command:
git clone https://code.google.com/p/<repository-name>/
and after that I added some files to the repository and executed, git add
, followed by git commit
. But when I executed git push origin master
it gave the following error
fatal: remote error: Repository not found
When google'ed for this issue, I found couple of links but the work-around that was mentioned in that didn't seem to work. Any suggestion would be highly appreciated!
UPDATE: I have tried the following work-arounds but unsuccessful:
- Update the
url
in the.git/config
to takeusername
andpassword
- Give the
username
andpassword
in theurl
in thegit clone
command - Update
username
andpassword
with globalgit
config command
Try 'git remote show origin' to confirm the remote communication.
Is the 'security' button checked at Google Project Hosting. If so, maybe you are using the wrong password (Google Code password versus Google Account password).
[edit]
When you clone a Google project, you get a custom repository name. For example, I cloned the 'playn' project and was given a project name of 'gozoner-playn-too' (based on the info that I provided). When you make your local clone it needs to be of this repository. In my case:
git clone https://code.google.com/p/gozoner-playn-too
And the push then works:
$ git push origin
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 256 bytes, done.
...
Note, if you've already checked out the wrong clone (like I suspect) you can change the url to the correct one with:
git remote set-url origin https://code.google.com/p/gozoner-playn-too
After this the .git/config file has this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://code.google.com/p/gozoner-playn-too
You did everything as the code.google.com says.But you also need to add the remote origin to git.It is like...
git remote add origin https://code.google.com/p/your-project-name
then push the added code like...
git push orgin --all
For start-up to code.google.com git use see the complete instruction here http://matrixsust.blogspot.com/2012/06/1.html
Hope it helps!
来源:https://stackoverflow.com/questions/10202015/code-google-com-git-fatal-remote-error-repository-not-found