{"id":19106,"date":"2024-11-19T14:02:53","date_gmt":"2024-11-19T06:02:53","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19106\/"},"modified":"2024-11-19T14:02:53","modified_gmt":"2024-11-19T06:02:53","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8windows%e4%b8%8a%e8%ae%be%e7%bd%aegit%e4%bb%a3%e7%90%86","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19106\/","title":{"rendered":"\u5982\u4f55\u5728Windows\u4e0a\u8bbe\u7f6eGit\u4ee3\u7406"},"content":{"rendered":"<p>windows\u4e2d\u4f7f\u7528git\u53ef\u80fd\u4f1a\u9047\u5230\u8fde\u63a5\u901f\u5ea6\u7f13\u6162\u7684\u60c5\u51b5\u3002\u8fd9\u901a\u5e38\u662f\u56e0\u4e3agit\u4e0d\u80fd\u76f4\u63a5\u8fde\u63a5\u5230\u8fdc\u7a0b\u5b58\u50a8\u5e93\uff0c\u9700\u8981\u8bbe\u7f6e\u4ee3\u7406\u670d\u52a1\u5668\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728windows\u4e0a\u8bbe\u7f6egit\u4ee3\u7406\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u68c0\u67e5\u5df2\u6709\u7684\u4ee3\u7406\u8bbe\u7f6e<\/p>\n<p>\u5728\u5f00\u59cb\u8bbe\u7f6eGit\u4ee3\u7406\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u786e\u5b9a\u4f60\u7684Windows\u7cfb\u7edf\u662f\u5426\u5df2\u7ecf\u8bbe\u7f6e\u4e86\u4ee3\u7406\u3002\u5982\u679c\u4f60\u7684Windows\u7cfb\u7edf\u5df2\u7ecf\u8bbe\u7f6e\u4e86\u4ee3\u7406\uff0c\u90a3\u4e48Git\u4e5f\u4f1a\u9075\u5faa\u76f8\u540c\u7684\u4ee3\u7406\u8bbe\u7f6e\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5\uff1a<\/p>\n<pre>netsh winhttp show proxy<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u8f93\u51fa\u7ed3\u679c\u4e2d\u663e\u793a\u201c\u76f4\u63a5\u8bbf\u95ee\uff08\u65e0\u4ee3\u7406\u670d\u52a1\u5668\uff09\u201d\uff0c\u5219\u8bf4\u660e\u4f60\u7684\u7cfb\u7edf\u6ca1\u6709\u8bbe\u7f6e\u4ee3\u7406\u3002\u5426\u5219\uff0c\u5c06\u663e\u793a\u4ee3\u7406\u670d\u52a1\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5305\u62ec\u4ee3\u7406\u7c7b\u578b\u3001\u4ee3\u7406\u670d\u52a1\u5668\u7684IP\u5730\u5740\u548c\u7aef\u53e3\u53f7\u7b49\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u914d\u7f6e\u5168\u5c40\u4ee3\u7406<\/p>\n<p>\u5982\u679c\u4f60\u5728\u4f7f\u7528Git\u65f6\u9700\u8981\u8de8\u5883\u8bbf\u95eegithub\u7b49\u56fd\u5916\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u914d\u7f6e\u5168\u5c40\u4ee3\u7406\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u8bbe\u7f6eGit\u7684\u5168\u5c40\u4ee3\u7406\uff0c\u5c06\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740\u548c\u7aef\u53e3\u53f7\u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u7684\uff1a<\/p>\n<pre>git config --global http.proxy http:\/\/\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740:\u7aef\u53e3\u53f7\ngit config --global https.proxy https:\/\/\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740:\u7aef\u53e3\u53f7<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u4f60\u4e0d\u9700\u8981\u4ee3\u7406\u8bbf\u95ee\u672c\u5730\u7684Git\u670d\u52a1\u5668\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u53d6\u6d88\u5168\u5c40\u4ee3\u7406\u8bbe\u7f6e\uff1a<\/p>\n<pre>git config --global --unset http.proxy\ngit config --global --unset https.proxy<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u7b2c\u4e09\u6b65\uff1a\u914d\u7f6e\u5355\u4e2a\u5b58\u50a8\u5e93\u4ee3\u7406<\/p>\n<p>\u9664\u4e86\u5168\u5c40\u4ee3\u7406\u5916\uff0cGit\u8fd8\u652f\u6301\u4e3a\u5355\u4e2a\u5b58\u50a8\u5e93\u8bbe\u7f6e\u4ee3\u7406\u3002\u8fd9\u6837\u53ef\u4ee5\u5728\u4e0d\u5f71\u54cd\u5176\u4ed6\u5b58\u50a8\u5e93\u7684\u60c5\u51b5\u4e0b\uff0c\u4e3a\u7279\u5b9a\u7684\u5b58\u50a8\u5e93\u914d\u7f6e\u4ee3\u7406\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u4e3a\u5355\u4e2a\u5b58\u50a8\u5e93\u914d\u7f6e\u4ee3\u7406\uff0c\u5c06\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740\u548c\u7aef\u53e3\u53f7\u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u7684\uff1a<\/p>\n<pre>cd \u5b58\u50a8\u5e93\u76ee\u5f55\ngit config http.proxy http:\/\/\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740:\u7aef\u53e3\u53f7\ngit config https.proxy https:\/\/\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740:\u7aef\u53e3\u53f7<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u4f60\u60f3\u53d6\u6d88\u4e3a\u5355\u4e2a\u5b58\u50a8\u5e93\u914d\u7f6e\u7684\u4ee3\u7406\u8bbe\u7f6e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>cd \u5b58\u50a8\u5e93\u76ee\u5f55\ngit config --unset http.proxy\ngit config --unset https.proxy<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5728Windows\u7cfb\u7edf\u4e0b\u4f7f\u7528Git\u8bbe\u7f6e\u4ee3\u7406\u7684\u6b65\u9aa4\u3002\u901a\u8fc7\u4ee5\u4e0a\u7684\u914d\u7f6e\uff0c\u4f60\u53ef\u4ee5\u66f4\u52a0\u5feb\u901f\u548c\u7a33\u5b9a\u5730\u8bbf\u95ee\u8fdc\u7a0bGit\u5b58\u50a8\u5e93\uff0c\u8ba9\u4f60\u66f4\u52a0\u9ad8\u6548\u5730\u5b8c\u6210\u4f60\u7684\u5f00\u53d1\u5de5\u4f5c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728Windows\u4e0a\u8bbe\u7f6eGit\u4ee3\u7406\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>windows\u4e2d\u4f7f\u7528git\u53ef\u80fd\u4f1a\u9047\u5230\u8fde\u63a5\u901f\u5ea6\u7f13\u6162\u7684\u60c5\u51b5\u3002\u8fd9\u901a\u5e38\u662f\u56e0\u4e3agit\u4e0d\u80fd\u76f4\u63a5\u8fde\u63a5\u5230\u8fdc\u7a0b\u5b58\u50a8\u5e93\uff0c\u9700\u8981\u8bbe\u7f6e\u4ee3\u7406\u670d\u52a1\u5668\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728windows\u4e0a\u8bbe\u7f6egit\u4ee3\u7406\u3002 \u7b2c\u4e00\u6b65\uff1a\u68c0\u67e5\u5df2\u6709\u7684\u4ee3\u7406\u8bbe\u7f6e \u5728\u5f00\u59cb\u8bbe\u7f6eGit\u4ee3\u7406\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u786e\u5b9a\u4f60\u7684Windows\u7cfb\u7edf\u662f\u5426\u5df2\u7ecf\u8bbe\u7f6e\u4e86\u4ee3\u7406\u3002\u5982\u679c\u4f60\u7684Windows\u7cfb\u7edf\u5df2\u7ecf\u8bbe\u7f6e\u4e86\u4ee3\u7406\uff0c\u90a3\u4e48Git\u4e5f\u4f1a\u9075\u5faa\u76f8\u540c\u7684\u4ee3\u7406\u8bbe\u7f6e\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5\uff1a netsh winhttp show proxy \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u8f93\u51fa\u7ed3\u679c\u4e2d\u663e\u793a\u201c\u76f4\u63a5\u8bbf\u95ee\uff08\u65e0\u4ee3\u7406\u670d\u52a1\u5668\uff09\u201d\uff0c\u5219\u8bf4\u660e\u4f60\u7684\u7cfb\u7edf\u6ca1\u6709\u8bbe\u7f6e\u4ee3\u7406\u3002\u5426\u5219\uff0c\u5c06\u663e\u793a\u4ee3\u7406\u670d\u52a1\u5668\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5305\u62ec\u4ee3\u7406\u7c7b\u578b\u3001\u4ee3\u7406\u670d\u52a1\u5668\u7684IP\u5730\u5740\u548c\u7aef\u53e3\u53f7\u7b49\u3002 \u7b2c\u4e8c\u6b65\uff1a\u914d\u7f6e\u5168\u5c40\u4ee3\u7406 \u5982\u679c\u4f60\u5728\u4f7f\u7528Git\u65f6\u9700\u8981\u8de8\u5883\u8bbf\u95eegithub\u7b49\u56fd\u5916\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u914d\u7f6e\u5168\u5c40\u4ee3\u7406\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u8bbe\u7f6eGit\u7684\u5168\u5c40\u4ee3\u7406\uff0c\u5c06\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740\u548c\u7aef\u53e3\u53f7\u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u7684\uff1a git config &#8211;global http.proxy http:\/\/\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740:\u7aef\u53e3\u53f7 git config &#8211;global https.proxy https:\/\/\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740:\u7aef\u53e3\u53f7 \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u4f60\u4e0d\u9700\u8981\u4ee3\u7406\u8bbf\u95ee\u672c\u5730\u7684Git\u670d\u52a1\u5668\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u53d6\u6d88\u5168\u5c40\u4ee3\u7406\u8bbe\u7f6e\uff1a git config &#8211;global &#8211;unset http.proxy git config &#8211;global &#8211;unset https.proxy \u767b\u5f55\u540e\u590d\u5236 \u7b2c\u4e09\u6b65\uff1a\u914d\u7f6e\u5355\u4e2a\u5b58\u50a8\u5e93\u4ee3\u7406 \u9664\u4e86\u5168\u5c40\u4ee3\u7406\u5916\uff0cGit\u8fd8\u652f\u6301\u4e3a\u5355\u4e2a\u5b58\u50a8\u5e93\u8bbe\u7f6e\u4ee3\u7406\u3002\u8fd9\u6837\u53ef\u4ee5\u5728\u4e0d\u5f71\u54cd\u5176\u4ed6\u5b58\u50a8\u5e93\u7684\u60c5\u51b5\u4e0b\uff0c\u4e3a\u7279\u5b9a\u7684\u5b58\u50a8\u5e93\u914d\u7f6e\u4ee3\u7406\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u4e3a\u5355\u4e2a\u5b58\u50a8\u5e93\u914d\u7f6e\u4ee3\u7406\uff0c\u5c06\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740\u548c\u7aef\u53e3\u53f7\u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u7684\uff1a cd \u5b58\u50a8\u5e93\u76ee\u5f55 git config http.proxy http:\/\/\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740:\u7aef\u53e3\u53f7 git config https.proxy https:\/\/\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740:\u7aef\u53e3\u53f7 \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u4f60\u60f3\u53d6\u6d88\u4e3a\u5355\u4e2a\u5b58\u50a8\u5e93\u914d\u7f6e\u7684\u4ee3\u7406\u8bbe\u7f6e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a cd \u5b58\u50a8\u5e93\u76ee\u5f55 git config &#8211;unset http.proxy git [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-19106","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=19106"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19106\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}