2

projectlocker に git プロジェクトをセットアップして、自分の git ファイルをプッシュします。次に、git プロジェクトを初期化し、ファイルをステージングしたディレクトリに移動しました。最後に、次のコマンドでプロジェクトを projectlocker にプッシュしようとしました。

$ git push git-smichaels@free5.projectlocker.com:helloworld.git

次のエラーが生成されます。

warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated.  This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: avoid seeing this message again, by configuring 'push.default' to:
warning:   'nothing'  : Do not push anything
warning:   'matching' : Push all matching branches (default)
warning:   'tracking' : Push the current branch to whatever it is tracking
warning:   'current'  : Push the current branch
ERROR:gitosis.serve.main:Repository read access denied
fatal: The remote end hung up unexpectedly

このように押し込もうとして何か問題がありますか?

この構文を使用している誰かの例を見つけました:

git remote add myproject 'git-myloginname@projectlocker.com:myproj.git'
git push myproject +master:master 

" " を使用する必要がremote addありますか? 上記のように URL に直接プッシュできないのはなぜですか?

4

4 に答える 4

15

これが本当のエラーです。リポジトリへの読み取りアクセス権がありませんか?

ERROR:gitosis.serve.main:Repository read access denied

残りは単なる警告です。警告を取り除きたい場合は、次のようにします。

git push git-smichaels@free5.projectlocker.com:helloworld.git [branchname]

[branchname] が指定されていない場合に警告なしで Git に現在のブランチをプッシュさせたい場合は、次のようにします。

git config push.default current
于 2009-09-25T04:44:41.117 に答える
2

あなたの本当の問題は警告メッセージに埋もれていました

ERROR:gitosis.serve.main:Repository read access denied

リポジトリにアクセスできることを確認してください

于 2009-09-25T04:43:15.163 に答える
0

私はProjectLockerを使用しています。ProjectLockerポータルでチケットを提出すると、プロジェクトを確認して、リポジトリへのアクセスを妨げる問題がないことを確認できます。

于 2009-09-25T22:39:26.787 に答える
0

また、ProjectLocker アカウント自体から自分自身をプロジェクトに追加してください。これを行うには、左側のペインで [List Account Users] をクリックし、ユーザーの 1 人として (おそらく管理者として) リストされていることを確認してから、[List Projects] をクリックし、プロジェクト名を選択します ([編集] リンクではありません)。 )、「プロジェクトのユーザー」という見出しの下に、自分自身がリストされているはずです。そこにいない場合は、同期しようとしている特定のプロジェクトにユーザー ID を追加してください。ちなみに、これは、プロジェクトにアクセスできる他のユーザー、つまり読み取り/書き込み権限を制御する方法でもあります。

于 2010-09-09T05:52:23.390 に答える