{"id":7199,"date":"2015-02-26T15:16:53","date_gmt":"2015-02-26T07:16:53","guid":{"rendered":"http:\/\/jpuyy.com\/?p=7199"},"modified":"2015-02-26T15:17:31","modified_gmt":"2015-02-26T07:17:31","slug":"git-cache-https-auth","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=7199","title":{"rendered":"git\u901a\u8fc7https\u65b9\u5f0f\u8bbf\u95ee\u65f6\u4fdd\u5b58\u8ba4\u8bc1"},"content":{"rendered":"<p>\u4ece github \u4e0a\u66f4\u65b0\u4ee3\u7801\uff0c\u7528\u7684\u65b9\u5f0f\u4e3a https\u65b9\u5f0f\u3002\u5982\u679c git \u5ba2\u6237\u7aef >= 1.7.9\uff0c\u4f7f\u7528\u5982\u4e0b\u65b9\u5f0f\u7f13\u5b58\u5bc6\u7801<\/p>\n<pre>git config --global credential.helper cache<\/pre>\n<p>\u9ed8\u8ba4\u7f13\u5b58 900s( 15 min)\uff0c\u8bbe\u7f6e 1 \u5c0f\u65f6<\/p>\n<pre>git config --global credential.helper \"cache --timeout=3600\"<\/pre>\n<p>\u5982\u679c git \u5ba2\u6237\u7aef < 1.7.9\n\n\u4f7f\u7528\u547d\u4ee4\n\n\n\n<pre>git config remote.origin.url https:\/\/you:password@github.com\/you\/example.git<\/pre>\n<p>\u6216\u76f4\u63a5\u7f16\u8f91\u6587\u4ef6 .git\/config\uff0c \u5728 username \u540e\u52a0\u4e0a\u4f60\u7684\u5bc6\u7801<\/p>\n<pre>[remote \"origin\"]\r\n        fetch = +refs\/heads\/*:refs\/remotes\/origin\/*\r\n        url = https:\/\/username:password@github.com\/jpuyy\/myproxy.git<\/pre>\n<p>\u53c2\u8003\uff1a<br \/>\nhttp:\/\/stackoverflow.com\/questions\/5343068\/is-there-a-way-to-skip-password-typing-when-using-https-github<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece github \u4e0a\u66f4\u65b0\u4ee3\u7801\uff0c\u7528\u7684\u65b9\u5f0f\u4e3a https\u65b9\u5f0f\u3002\u5982\u679c git \u5ba2\u6237\u7aef >= 1.7.9\uff0c\u4f7f\u7528\u5982\u4e0b\u65b9\u5f0f\u7f13\u5b58\u5bc6\u7801 git config &#8211;global credential.helper cache \u9ed8\u8ba4\u7f13\u5b58 900s( 15 min)\uff0c\u8bbe\u7f6e 1 \u5c0f\u65f6 git config &#8211;global credential.helper &#8220;cache &#8211;timeout=3600&#8221; \u5982\u679c git \u5ba2\u6237\u7aef < 1.7.9 \u4f7f\u7528\u547d\u4ee4 git config remote.origin.url https:\/\/you:password@github.com\/you\/example.git \u6216\u76f4\u63a5\u7f16\u8f91\u6587\u4ef6 .git\/config\uff0c \u5728 username \u540e\u52a0\u4e0a\u4f60\u7684\u5bc6\u7801 [remote \"origin\"] fetch = +refs\/heads\/*:refs\/remotes\/origin\/* url = https:\/\/username:password@github.com\/jpuyy\/myproxy.git \u53c2\u8003\uff1a http:\/\/stackoverflow.com\/questions\/5343068\/is-there-a-way-to-skip-password-typing-when-using-https-github\n<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[168],"tags":[],"class_list":["post-7199","post","type-post","status-publish","format-standard","hentry","category-git"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/7199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7199"}],"version-history":[{"count":2,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/7199\/revisions"}],"predecessor-version":[{"id":7201,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/7199\/revisions\/7201"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}