Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configuring GH env vars to get user's public keys #200

Merged
merged 5 commits into from
Oct 9, 2023

Conversation

owenthereal
Copy link
Owner

This PR supports configuring GH env vars to get a user's public keys including GH_TOKEN/GITHUB_TOKEN, GH_ENTERPRISE_TOKEN/GITHUB_ENTERPRISE_TOKEN & GH_HOST. If the gh CLI is set up, upterm automatically adopts the GH token/host from the CLI with a fallback to public GH API calls.

Besides, this PR also enables displaying authorized keys with upterm session current, which makes it explicit that what keys are allowed to connect:

$ upterm session current
=== NIAQ8SWYKINTSYQDR7ZK
Command:                /bin/zsh
Force Command:          n/a
Host:                   ssh://uptermd.upterm.dev:22
Authorized Keys:        owenthereal:
                        - SHA256:D9RTzgSuaLQB47NIl6WKf6JrsLVJFngVwHinTSj8ScE
                        - SHA256:oD5PPCpSw7kFtb/TsHGbu+8OsjDL/CUHsxS0mUzqEms
SSH Session:            ssh niAq8sWykintsYQdR7Zk:OTE4NTc0NzZiNDA5Mjgudm0udXB0ZXJtLmludGVybmFsOjIyMjI=@uptermd.upterm.dev

This closes #191.

@owenthereal owenthereal merged commit c8d2f78 into master Oct 9, 2023
8 checks passed
@owenthereal owenthereal deleted the owenthereal/github_enterprise branch October 9, 2023 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant