2017-01-23 45 views
-1

我想使用ghi對我的回購,我已經嘗試了多種方式來設置ghi配置,但沒有工作。有些我已經試過的東西:Github的命令行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是終點?我如何編輯該網址作爲我的終點?

回答

0

問題解決了,貌似爲GHI通過2FA與github上工作,我需要的是以下兩個混帳配置:

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

我仍然得到一個Bad credentials試圖ghi config --auth <username>,但ghi list工程。我認爲使用令牌,然後不再需要用戶名和密碼。