gpt4 book ai didi

Git http.cookiefile 配置选项不起作用

转载 作者:太空狗 更新时间:2023-10-29 14:23:55 25 4
gpt4 key购买 nike

配置选项git config --global http.cookiefile /<absolute path>/my_cookiefile似乎对 git 没有任何影响。具有以下 cookiefile:

Set-Cookie:my_cookie=my_value; Path=/; Domain=.github.com

该文件直接使用完美工作:

$curl -v --cookie my_cookiefile https://github.com/my_url

GET my_url HTTP/1.1
Host: github.com
Cookie: my_cookie=my_value

但它对 git 没有影响(相同的 curl 输出但没有 cookie header ):

$export GIT_CURL_VERBOSE=1 && git clone https://github.com/my_url

GET my_url HTTP/1.1
Host: github.com

git 版本 1.7.1

知道哪里出了问题吗?

最佳答案

您可以尝试手动添加它。首先导航到您的 .git目录和 cat config文件。如果不包括 cookiefile设置为某些东西(在 = 之后是 =),您可以尝试像这样手动设置它:打开 config在您选择的编辑器中创建文件,并将以下内容粘贴到该文件的底部,替换 <absolute_path_to_file>使用您的 cookie 文件的绝对路径(如果该部分已定义,则省略 [http];如果已定义,请在现有部分下添加设置):

[http]
cookiefile = <absolute_path_to_file>

保存,退出并重试。

关于Git http.cookiefile 配置选项不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17876601/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com