- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
问题Git
在通过 HTTPS 为 81 kB 存储库写入对象时挂起(不允许 SSH)。 Nginx 的 access.log
的具体错误信息如下:
POST /Hello-World/.git/git-receive-pack HTTP/1.1" 504 183 "-" "git/2.28.0.windows.1"
背景
www
都单独挂载为只读。此外,我的 Git 根文件夹位于
www
(即
www/git
)内。
sudo mount -o loop,offset=1 raspbian-stretch-lite.img /mnt/
sudo mount --bind www/ /mnt/usr/share/nginx/www/
sudo mount -o bind,remount,ro /mnt/usr/share/nginx/www
我的 Nginx 配置如下:
server {
listen 443 ssl;
server_name git.domain.com;
ssl_certificate fullchain.pem;
ssl_certificate_key privkey.pem;
# fast clone static files
location ~ \.git/objects/(?:[0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+\.(?:pack|idx))$ {
root /usr/share/nginx/www/git;
limit_except GET HEAD {
allow all;
}
}
location ~ ^.*\.git/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack) {
root /usr/share/nginx/www/git;
auth_basic "Restricted";
auth_basic_user_file /usr/share/nginx/www/auth;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT $realpath_root;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $uri;
fastcgi_param unix:/var/fcgiwrap.socket;
}
location /gitweb.cgi {
root /usr/share/nginx/www/gitweb;
include fastcgi_params:
gzip off;
fastcgi_param SCRIPT_NAME $uri:
fastcgi_param GITWEB_CONFIG $realpath_root/gitweb.conf;
fastcgi_pass unix:/var/fcgiwrap.socket;
}
location / {
root /usr/share/nginx/www/gitweb;
index gitweb.cgi;
}
}
如果我从浏览器访问
https://git.domain.com
,我会得到一个
Gitweb
GUI。我用
git clone https://git.domain.com/Hello-World/.git
克隆,一切都很好。但是当我尝试使用
git push
推送时,它在写入对象步骤时挂起,最终给我一个网关超时错误。有趣的是,每次发生这种情况时,
https://git.domain.com
Gitweb 页面和 Git 后端都关闭,迫使我杀死并重新启动我的
fcgiwrap
进程。
git config --global http.postBuffer 524288000
无济于事。因为我正在验证(通过输入我的用户名和密码),所以应该允许
git-receive-pack
,对吗?
git
文件夹没有写权限有关?也许我的 Nginx 配置的正则表达式不正确?
Normally errors from Git would go to stderr, which is usually written into a log by the web server. Is there such a log on your system, and if so, what does it contain?
(base) C:\Users\pairwiseseq\Hello-World>git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 258 bytes | 258.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date
同样来自 Nginx 的
error.log
:
*9 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 123.456.7.890, server: git.domain.com, request: "POST /Hello-World/.git/git-receive-pack HTTP/1.1", upstream: "fastcgi://unix:/var/fcgiwrap.socket", host: "git.domain.com"
strace
用于
fcgiwrap
进程:
read(3, "\1\1\0\1\0\10\0\0\0\1\1\0\0\0\0\0\1\4\0\1\0041\7\0\f\0QUERY_STRING\16\4REQUEST_METHODPOST\f&CONTENT_TYPEapplication/x-git-receive-pack-request\16\3CONTENT_LENGTH452\v\"SCRIPT_NAME/Hello-World/.git/git-receive-pack\v\"REQUEST_URI/Hello-World/.git/git-receive-pack\f\"DOCUMENT_URI/Hello-World/.git/git-receive-pack\r\30DOCUMENT_ROOT/usr/share/nginx/www/git\17\10SERVER_PROTOCOLHTTP/1.1\16\5REQUEST_SCHEMEhttps\5\2HTTPSon\21\7GATEWAY_INTERFACECGI/1.1\17\fSERVER_SOFTWAREnginx/1.10.3\v\rREMOTE_ADDR123.456.7.890\v\5REMOTE_PORT39118\v\fSERVER_ADDR123.456.7.12\v\3SERVER_PORT443\v\20SERVER_NAMEgit.domain.com\17\3REDIRECT_STATUS200\17\"SCRIPT_FILENAME/usr/lib/git-core/git-http-backend\23\0GIT_HTTP_EXPORT_ALL\20\30GIT_PROJECT_ROOT/usr/share/nginx/www/git\v\10REMOTE_USERusername\t\"PATH_INFO/Hello-World/.git/git-receive-pack\24\4HTTP_ACCEPT_ENCODINGgzip\v\10HTTP_PRAGMAno-cache\17\31HTTP_USER_AGENTJGit/5.1.2.201810061102-r\22*HTTP_AUTHORIZATIONBasic cGc5eno0c2g6WWw5V1RpdnVrWlE2QTRNRw==\21&HTTP_CONTENT_TYPEapplication/x-git-receive-pack-request\v%HTTP_ACCEPTapplication/x-git-receive-pack-result\25\4HTTP_CONTENT_ENCODINGgzip\23\3HTTP_CONTENT_LENGTH452\t\20HTTP_HOSTgit.domain.com\17\nHTTP_CONNECTIONKeep-Alive\0\0\0\0\0\0\0\1\4\0\1\0\0\0\0\1\5\0\1\1\304\4\0\37\213\10\0\0\0\0\0\0\0\1\255\1R\37600b97fd1a60b01f91b314f59955a4e4d4e80d8edf11d f1a5d26dcb87f31b127cd397894aae43f86f362c refs/heads/master\0report-status delete-refs ofs-delta side-band-64k agent=JGit/5.1.2.201810061102-r0000PACK\0\0\0\2\0\0\0\3\234\fx\234\225\313\301\r\3020\f@\321{\246\310\2\225\354&v\32\t!\6\340\306\4I\354\10\16\220*r\367\247\214\300\345\35\276\364m\252zT&\26\222\36\326\232\2\244J\25\267\225\2651\"K<\273f\255\215\334^\246~\314\247.X\30*`\317X\3\306N9\23\225\250Q\242n \233JG\24W\16{\216\351m\234\\~\336\36\307\354\245\351r/\273\215}\tW\217\fk\f\t3\373\5\10\300\265\361~\277\314\364\337\317}\1q~<[\242\2x\234340031Q\10rut\361ue\210\233\301z.Q\341Ks\234\307\375\0O\311\233\5\355N\241:\0\257\246\v\211=x\234\363H\315\311\311WHLO\314\314S\344\2\0 d\4@\4{\334\"\301R\v\30\337\271\275\n\203\3349{D\255S;9\301\247\200\255\1\0\0\0\0\0\0\1\5\0\1\0\0\0\0", 8192) = 1584
write(5, "\37\213\10\0\0\0\0\0\0\0\1\255\1R\37600b97fd1a60b01f91b314f59955a4e4d4e80d8edf11d f1a5d26dcb87f31b127cd397894aae43f86f362c refs/heads/master\0report-status delete-refs ofs-delta side-band-64k agent=JGit/5.1.2.201810061102-r0000PACK\0\0\0\2\0\0\0\3\234\fx\234\225\313\301\r\3020\f@\321{\246\310\2\225\354&v\32\t!\6\340\306\4I\354\10\16\220*r\367\247\214\300\345\35\276\364m\252zT&\26\222\36\326\232\2\244J\25\267\225\2651\"K<\273f\255\215\334^\246~\314\247.X\30*`\317X\3\306N9\23\225\250Q\242n \233JG\24W\16{\216\351m\234\\~\336\36\307\354\245\351r/\273\215}\tW\217\fk\f\t3\373\5\10\300\265\361~\277\314\364\337\317}\1q~<[\242\2x\234340031Q\10rut\361ue\210\233\301z.Q\341Ks\234\307\375\0O\311\233\5\355N\241:\0\257\246\v\211=x\234\363H\315\311\311WHLO\314\314S\344\2\0 d\4@\4{\334\"\301R\v\30\337\271\275\n\203\3349{D\255S;9\301\247\200\255\1\0\0", 452) = 452
read(6, "Expires: Fri, 01 Jan 1980 00:00:00 GMT\r\nPragma: no-cache\r\nCache-Control: no-cache, max-age=0, must-revalidate\r\nContent-Type: application/x-git-receive-pack-result\r\n\r\n", 4096) = 165
在此之后,
fcgiwrap
完全挂起。我现在既不能
clone
也不能
push
并且必须产生一个新的
fcgiwrap
进程。
最佳答案
您是否尝试过 here 中的答案? ?
git config --add remote.origin.proxy ""
还有一个答案
here人们用“推送”提示 504 错误。
I also got HTTP 504 errors (gateway timeout) with push at first; for me, this was caused by a permission problem: fcgiwrap ran as user www-data, but the git repository directories were owned by another user.
关于Git push 在写入对象时卡住并给出 504 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64273391/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!