owenthereal / upterm

Instant Terminal Sharing
https://upterm.dev
Apache License 2.0
816 stars 53 forks source link

feat: github users via API #191

Closed bavarianbidi closed 9 months ago

bavarianbidi commented 9 months ago

if a GitHub Enterprise instance requires authentication for every endpoint it's not possible to fetch the public keys via /.keys

With a dedicated PAT with the scope read:public_key it's possible to fetch the public keys via the API

This PR will also add some some information to the ~/.upterm/upterm.log to make it more transparent if public keys didn't get found.

TODO:

owenthereal commented 9 months ago

Thanks for the contributions! Instead of adding more flags to upterm, I would prefer integrating upterm with the gh CLI and get the GH token/host from gh CLI's storage: https://github.com/owenthereal/upterm/pull/200. One pro is that if one has the gh CLI set up, upterm will adopt the token/host from it. If gh is not set up, setting GH_TOKEN & GH_HOST will also get upterm to call GH API with the specified token & host (just like how the gh CLI works). This should be sufficient to meet the GitHub Entperise use case.