Ondra Žižka
Ondra Žižka

Reputation: 46796

Git push does nothing with Google Code repo as remote

I have a git project at Google Code. https://code.google.com/p/jawabot/

I did some commits to master branch. They're fine, visible in git log. Now when I do git push, I get "

$ git push
Password: 
Everything up-to-date

And sometimes:

$ git push
Password: 
error: The requested URL returned error: 403 while accessing    https://[email protected]/p/jawabot//info/refs

fatal: HTTP request failed

Update:

$ git remote -v
origin  https://[email protected]/p/jawabot/ (fetch)
origin  https://[email protected]/p/jawabot/ (push)

What's wrong? Me or Google? (I'm git newbie.)

If someone was so kind and tried to push something there, I'd be glad (I assume I will be able to revert such change).

Update:

Based on answers, I tried (git:// url guessed):

$ git remote add gc [email protected]:jawabot/jawabot.git
$ git remote -v
gc      [email protected]:jawabot/jawabot.git (fetch)
gc      [email protected]:jawabot/jawabot.git (push)
origin  https://[email protected]/p/jawabot/ (fetch)
origin  https://[email protected]/p/jawabot/ (push)
ondra@ondra-doma:/mnt/ssd1/_projekty/JawaBot-2.0-git$ git push gc

ssh: connect to host code.google.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly

Upvotes: 3

Views: 4486

Answers (4)

manojlds
manojlds

Reputation: 301147

What you are trying to do is answered in the FAQ: http://code.google.com/p/support/wiki/GitFAQ

Both why just a git push would not work and also on supporting https only and not other protocols.

Why does Git refuse to push, saying "everything up to date"?

git push with no additional arguments only pushes branches that exist in the remote already. If the remote repository is empty, nothing will be pushed. In this case, explicitly specify a branch to push, e.g. git push master.

Can I access my repository over git:// or ssh:// instead of https:// ?

In order to take advantage of the advanced scalability and load-balancing features of Google's production servers, we are only able to accept incoming HTTP connections. We have no plans to support protocols other than the Git Smart HTTP protocol introduced in v1.6.6.

We do support both anonymous (read-only) and authenticated (read/write) access over HTTPS.

Upvotes: 6

Ondra Žižka
Ondra Žižka

Reputation: 46796

Solved - It was missing the branch specification...

$ git push origin master
Password: 
Counting objects: 3724, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2762/2762), done.
Writing objects: 100% (3724/3724), 1.21 MiB | 136 KiB/s, done.
Total 3724 (delta 1669), reused 0 (delta 0)
remote: Scanning pack: 100% (3724/3724), done.
remote: Storing objects: 100% (3724/3724), done.
remote: Processing commits: 100% (196/196), done.
To https://[email protected]/p/jawabot/
 * [new branch]      master -> master
ondra@ondra-doma:/mnt/ssd1/_projekty/JawaBot-2.0-git$ 

Upvotes: 1

eWizardII
eWizardII

Reputation: 1936

Potentially what you might want to try doing is instead of using the https address, to use the git protocol, like git://git.foo.

Upvotes: 0

Anil Shanbhag
Anil Shanbhag

Reputation: 968

The steps for you would be . Did you forget 1

git add <files>
git commit -m 'message'
git push origin master 

Upvotes: 6

Related Questions