git pull origin master
ubuntu 12.04にアップグレードしてから、コマンドがコンピューターで機能しなくなった理由がわかりません。このコマンドは、他のすべてのコンピューターおよびサーバーから機能します。これが私が自分のコンピューターで行ったことです:
mkdir gittest
cd gittest
git init
git remote add origin http://johnuser@git.mywebsite.com/websiteproject
git pull origin master
パスワードの入力を求められます。だから私は正しいパスワードを与えます。しかし、私自身の個人的なubuntu 12.04では、次のエラーが発生します。
error: The requested URL returned error: 401 (curl_result = 22, http_code = 401, sha1 = d32f1e47321f14d4391168f7b26ce37f0b585803)
error: Unable to find d32f1e47321f14d4391168f7b26ce37f0b585803 under http://johnuser@git.mywebsite.com/websiteproject
Cannot obtain needed blob d32f1e47321f14d4391168f7b26ce37f0b585803
while processing commit eba6849896d12c9652bbc75ffcbc36ab2fc9a847.
error: Fetch failed.
を調べたところgit.mywebsite.com/log/error.log
、次のエラーが表示されました。
[Sun Jun 23 13:43:00 2013] [error] [client 11.11.11.11] user johnuser: authentication failure for "/websiteproject/objects/cf/fe85cd3a4af8f2cced2bdddbaed72f150ec568": Password Mismatch
前述のように、他のコンピューター (mac、windows、linux など) から問題はありません。git gc と git update-server-info を実行してみました。しかし、私のパソコンでも同じエラーが発生しました。
どうしたの?
追加情報: のような別のサーバーの URL から git pull を実行しても問題ありませんhttps://github.com/abraham/twitteroauth.git
。つまり、私のサーバーとコンピューターに固有のもののようです。
追加情報 2: わかりました。元の URL が の場合、git pull を実行できますhttp://johnuser:mypassword@git.mywebsite.com/websiteproject
。ただし、git push を試みると、端末が約 15 分間ハングしてから、次のエラーが表示されます。
Unable to refresh lock for http://johnuser:mypassword@git.mywebsite.com/websiteproject/info/refs
LOCK HTTP error 412
Apache エラー ログを調べたところ、次のように表示されました。
[Sun Jun 23 14:26:36 2013] [error] [client 11.11.11.11] (2)No such file or directory: The precondition(s) specified by the "If:" header did not match this resource. At least one failure is because: a State-token was supplied, but it was not found in the locks on this resource. [412, #0]
[Sun Jun 23 14:26:36 2013] [error] [client 11.11.11.11] Could not LOCK /websiteproject/info/refs due to a failed precondition (e.g. other locks). [412, #0]