[英]Github commandline GHI authentication error
I'm trying to use ghi against my repo, I have tried multiple ways to setup the ghi config, but none worked.我正在尝试对我的 repo 使用 ghi,我尝试了多种方法来设置 ghi 配置,但都没有奏效。 Some of the things I have tried:
我尝试过的一些事情:
git config --global github.user <username>
& git config --global github.token <token>
git config --global github.user <username>
& git config --global github.token <token>
ghi config --auth <username>
command to set the authentication.ghi config --auth <username>
命令来设置身份验证。 None of the above worked.以上都没有奏效。
When I do当我做
$ 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
So one thing I notice is that the Documentation_url is that the end point?所以我注意到的一件事是 Documentation_url 是终点? How would I edit that url to be my end point?
我将如何将该网址编辑为我的终点?
Problem resolved, looks like for the ghi to work with your github through 2FA, all I need was the following two git config:问题已解决,看起来 ghi 可以通过 2FA 与您的 github 一起使用,我只需要以下两个 git 配置:
git config github.host <your github host>
git config ghi.token <your personal access token>
I'm still getting a Bad credentials
while trying to ghi config --auth <username>
, but ghi list
works.在尝试
ghi config --auth <username>
,我仍然收到Bad credentials
,但ghi list
有效。 I think with token, then username and password is not needed anymore.我认为使用令牌,则不再需要用户名和密码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.