簡體   English   中英

Github 命令行 GHI 身份驗證錯誤

[英]Github commandline GHI authentication error

我正在嘗試對我的 repo 使用 ghi,我嘗試了多種方法來設置 ghi 配置,但都沒有奏效。 我嘗試過的一些事情:

  1. 設置環境變量:GITHUB_USER & GITHUG_TOKEN
  2. 運行git config --global github.user <username> & git config --global github.token <token>
  3. 只需使用ghi config --auth <username>命令來設置身份驗證。

以上都沒有奏效。

當我做

$ ghi -vv config --auth <username> ===> POST /authorizations {"scopes":["public_repo","repo"],"note":"ghi on <name-mbp.domain>","note_url":"https://github.com/stephencelis/ghi"} <=== 401: {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"} ✔ Bad credentials

所以我注意到的一件事是 Documentation_url 是終點? 我將如何將該網址編輯為我的終點?

問題已解決,看起來 ghi 可以通過 2FA 與您的 github 一起使用,我只需要以下兩個 git 配置:

git config github.host <your github host>
git config ghi.token <your personal access token>

在嘗試ghi config --auth <username> ,我仍然收到Bad credentials ,但ghi list有效。 我認為使用令牌,則不再需要用戶名和密碼。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM