2011-08-07 37 views
3

我在Google Code上有一個git項目。 https://code.google.com/p/jawabot/Git推送與谷歌代碼回購沒有任何關係作爲遠程

我做了一些提交到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://[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) 

什麼是錯Me或谷歌(我的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) 
[email protected]:/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 
+0

我想知道爲什麼會有人把-1 –

回答

6

你正在嘗試做的FAQ中回答:http://code.google.com/p/support/wiki/GitFAQ

爲什麼都只是一個git push是行不通的,也上僅支持https而不支持其他協議。

爲什麼Git拒絕推送,說「一切都是最新的」?

沒有附加參數的git push只推送已存在於遠端的分支 。如果遠程存儲庫爲空,則 什麼都不會被推送。在這種情況下,明確指定分支到 推,例如, git推大師。

我可以通過 git://或ssh://而不是https://訪問我的存儲庫嗎?

爲了利用先進的可擴展性和谷歌的生產服務器 負載平衡功能的優勢,我們只 能夠接受傳入的HTTP連接。我們沒有計劃支持除v1.6.6中引入的Git Smart HTTP協議之外的 協議。

我們通過HTTPS支持匿名(只讀)和認證 (讀/寫)訪問。

6

你的步驟將是。你忘了1

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

不行,正如我所說的,提交是在'git log'中。 –

+1

最後事實證明,我忘了第3步的一部分:) –

+0

第一次發生 - 大家摸索:) –

0

潛在的你可能會想嘗試做什麼,而不是使用HTTPS地址,使用Git協議,如Git://git.foo。

1

解決 - 這是缺少分支規範...

$ 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 
[email protected]:/mnt/ssd1/_projekty/JawaBot-2.0-git$