Git push 对远程的 Google Code repo 没有任何作用

标签 git push google-code

我在 Google Code 有一个 git 项目。 https://code.google.com/p/jawabot/

我对 master 分支做了一些提交。它们很好,在 git log 中可见。 现在,当我执行 git push 时,我得到“

$ git push
Password: 
Everything up-to-date

有时:

$ git push
Password: 
error: The requested URL returned error: 403 while accessing    https://dynawest@code.google.com/p/jawabot//info/refs

fatal: HTTP request failed

更新:

$ git remote -v
origin  https://dynawest@code.google.com/p/jawabot/ (fetch)
origin  https://dynawest@code.google.com/p/jawabot/ (push)

怎么了?我还是谷歌? (我是 git 新手。)

如果有人这么好心并试图在那里 push 一些东西,我会很高兴(我想我将能够恢复这种变化)。

更新:

根据答案,我尝试了(猜到 git://url):

$ git remote add gc git@code.google.com:jawabot/jawabot.git
$ git remote -v
gc      git@code.google.com:jawabot/jawabot.git (fetch)
gc      git@code.google.com:jawabot/jawabot.git (push)
origin  https://dynawest@code.google.com/p/jawabot/ (fetch)
origin  https://dynawest@code.google.com/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

最佳答案

您尝试做的事情在常见问题解答中得到了回答:http://code.google.com/p/support/wiki/GitFAQ

为什么只有 git push 不起作用,以及仅支持 https 而不是其他协议(protocol)。

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.

关于Git push 对远程的 Google Code repo 没有任何作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6970732/

相关文章:

Git 重写后未执行

Google 代码值错误上的 Mercurial 推送错误

svn - 将 SVN 存储库从 Google Code 传输到 RiouxSVN

git - 如何更改 git 子模块以指向子文件夹?

ruby-on-rails - 未 checkout ... bundle install 不修复帮助!

javascript - 我如何简单地从一个数组中取出一个属性并将其放入另一个数组中? Javascript

javascript - JavaScript 中的多个 IF 和 ELSE IF

wiki - 如何将某个页面设置为 Google 代码上的默认 wiki 页面?

git 说它是最新的,但实际上不是

xcode - 如何从源代码管理中删除静态库?