Git Push 对 Google Code 仓库作为远程仓库不执行任何操作

发布于 2024-11-28 04:37:32 字数 2343 浏览 1 评论 0原文

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

我对 <代码>主分支。它们很好,可以在 git log 中看到。 现在,当我执行git push时,我得到“

$ git push
Password: 
Everything up-to-date

有时:

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

fatal: HTTP request failed

更新:

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

出了什么问题?我还是Google?(我是git新手。)

如果有人如此友善并且尝试在那里推送一些东西,我会很高兴(我假设我能够恢复这样的更改)

更新:

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

$ 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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

◇流星雨 2024-12-05 04:37:33

您尝试执行的操作已在常见问题解答中得到解答:http://code.google.com /p/support/wiki/GitFAQ

既说明了为什么仅使用 git Push 不起作用,也说明了仅支持 https 而不是其他协议。

为什么 Git 拒绝推送,说“一切都是最新的”?

不带附加参数的 git Push 仅推送分支
已经存在于遥控器中。如果远程存储库为空,
没有什么会被推动。在这种情况下,明确指定一个分支
推送,例如 git push master。

我可以通过以下方式访问我的存储库吗
git:// 或 ssh:// 而不是 https:// ?

为了利用先进的可扩展性和
Google 生产服务器的负载平衡功能,我们只
能够接受传入的 HTTP 连接。我们没有计划支持
除了 v1.6.6 中引入的 Git Smart HTTP 协议之外的协议。

我们支持匿名(只读)和经过身份验证的
通过 HTTPS 进行(读/写)访问。

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.

何必那么矫情 2024-12-05 04:37:33

您的步骤是。你忘记了吗1

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

The steps for you would be . Did you forget 1

git add <files>
git commit -m 'message'
git push origin master 
情话墙 2024-12-05 04:37:33

已解决 - 缺少分支规范...

$ 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$ 

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$ 
〆一缕阳光ご 2024-12-05 04:37:33

您可能想要尝试做的不是使用 https 地址,而是使用 git 协议,例如 git://git.foo。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文