2021年3月29日星期一

GitHub cookiefile

Since Git uses cURL for HTTP, I am able to have a file ~/.netrc [1] like this:

machine github.com  login 89z  password [Personal access token]  

However it seems that another option is available, using cookies [2]. It looks like the syntax would be like this:

[http]     saveCookies = true     cookiefile = C:/cookie.txt  

My question is, can this be used to push to GitHub? If so, how would I create the cookie file?

  1. https://curl.se/libcurl/c/CURLOPT_NETRC.html
  2. https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpcookieFile
https://stackoverflow.com/questions/66858307/github-cookiefile March 30, 2021 at 12:51AM

没有评论:

发表评论