何が起きているか
gistコマンドでファイルをアップロードしようとしてもエラーになる。
> gist hoge.txt
Error: Got Net::HTTPUnauthorized from gist: {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}
原因
gistのログインが外れている。
解決方法
gistのログインを行うとアップロードできるようになります。
> gist --login
Requesting login parameters...
Please sign in at https://github.com/login/device
and enter code: ****-****
めでたしめでたし。