私の裸のreposをホストするオンラインサーバ(Ubuntu 17.04)があります。git-http-backend/nginx - push on error
error: Cannot access URL https://user:[email protected]/REPO/ , return code 22 fatal: git-http-push failed error: failed to push some refs to ' https://user:[email protected]/REPO/ '
nginxの設定関連部分はそのようになっています:それは次のエラーで失敗し、私は、このサーバー上でHTTPSをセットアップしようとした、と私は引くことができますが、私はプッシュすることはできません
# static repo files for cloning over https
location ~ ^.*\.git/objects/([0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+.(pack|idx))$ {
client_max_body_size 0;
auth_basic "Restricted Area";
auth_basic_user_file /etc/apache2/.htpasswd;
fastcgi_param REMOTE_USER $remote_user;
root /home/git/;
}
# requests that need to go to git-http-backend
location ~ ^.*\.git/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack)$ {
client_max_body_size 0;
auth_basic "Restricted Area";
auth_basic_user_file /etc/apache2/.htpasswd;
root /home/git/;
#fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
fastcgi_param PATH_INFO $uri;
fastcgi_param GIT_PROJECT_ROOT /home/git/;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REMOTE_USER $remote_user;
include fastcgi_params;
}
問題を読んだスレッドの中には、リモートURLのuser/passwdがないREMOTE_USERのfastcgiのパラメータやローカルのgitの設定がありましたが、私はそれを設定して私は無知です。誰かがアイデアを持っているのか、問題があるのでしょうか?
編集:ここに私の.git/configには、次のとおりです。
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://user:[email protected]/REPO/
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[user]
name = git
私はすでに私の.git/configに(ユーザ名はURLにあり、エラーを見て) とreceivepackを更新既定では認証されたユーザーに対して有効になり、匿名に対しては無効になります。これは、私が望むものです。 – Krapow
OK、nginxのfastcgi_paramsは、以前に定義されたパラメータを上書きする可能性はありますか? SSHの代わりにHTTPを使うときに 'git push -v'が役に立つ情報を提供するかどうかは分かりませんが、試してみることができます。 セットアップを再現できるかどうかを確認します。 – lovethebomb
また、あなたの質問を更新し、あなたのrepo '.git/config'を追加できますか? – lovethebomb