Commit graph

459 commits

Author SHA1 Message Date
Jason Lunz
61823997c2
always verify authorized keys in parallel with other work, and at most once 2021-12-17 16:46:53 -07:00
Jason Lunz
0af268da4e
properly indent ssh config example 2021-12-17 16:11:55 -07:00
Jason Lunz
06eb5ad47f
fetch remote ssh usernames in parallel 2021-12-17 16:10:44 -07:00
Jason Lunz
2ee88da647
close session on error 2021-12-17 14:42:54 -07:00
Jason Lunz
a05541f4ed
drop redundant API call 2021-12-17 11:39:14 -07:00
Jason Lunz
0670a7758b
use generic io interfaces 2021-12-17 11:18:59 -07:00
Jason Lunz
811d6505d2
tighten up ssh config help wording 2021-12-17 11:03:11 -07:00
Jason Lunz
206b6379c3
return non-zero if ssh config skips any codespaces 2021-12-17 10:47:22 -07:00
Jason Lunz
a9d02a746b
push fetching codespace details into openSSHSession callers 2021-12-16 17:19:34 -07:00
Jason Lunz
ac685611b1
openssh -> OpenSSH 2021-12-16 17:00:40 -07:00
Jason Lunz
71c9fa11f0
add more ssh config --help documentation 2021-12-16 17:00:40 -07:00
Jason Lunz
369ea534b6
explain why failure to connect to a codespace doesn't fail the entire command 2021-12-16 17:00:39 -07:00
Jason Lunz
4a6887f99e
add a comment explaining why we build an sshUsers map 2021-12-16 17:00:38 -07:00
Jason Lunz
6f8635a17e
listOpensshConfig -> printOpenSSHConfig 2021-12-16 17:00:37 -07:00
Jason Lunz
b7cd2bbc72
no need to separately declare vars here 2021-12-16 17:00:37 -07:00
Jason Lunz
3cb3cf7ca5
make ListOpensshConfig private 2021-12-16 17:00:36 -07:00
Jason Lunz
96a2e125e6
document the codespaceSSHConfig struct 2021-12-16 17:00:36 -07:00
Jason Lunz
ca3b59dd35
use struct embedding to express this less verbosely 2021-12-16 16:09:33 -07:00
Jason Lunz
ac3b0c50e3
Ssh -> SSH 2021-12-16 16:09:32 -07:00
Jason Lunz
92609bd1ec
Revert "use go-multierror to combine read/write close errors"
This reverts commit 456f4381e02aa843ddb3cc1b9628cb81487ba895.
2021-12-16 16:09:32 -07:00
Jason Lunz
3ca5cbab84
hide the gh cs ssh --stdio option in the --help message 2021-12-16 16:09:31 -07:00
Jason Lunz
8687fcb2a0
clean up gh cs ssh option parsing/validation 2021-12-16 16:09:30 -07:00
Jason Lunz
c9d0085e57
move gh cs ssh --config into a separate gh cs ssh config command
We could also move this to a toplevel command, but I don't want to
pollute that namespace too much. Open to suggestions.
2021-12-16 16:09:30 -07:00
Jason Lunz
0e6abda73b
allow generating ssh config for a single codespace 2021-12-16 15:42:39 -07:00
Jason Lunz
92403f3a2f
check for incompatible command line options 2021-12-16 15:42:38 -07:00
Jason Lunz
7765000601
add gh cs ssh openssh config file generator 2021-12-16 15:42:38 -07:00
Jason Lunz
4306762f8b
factor out openSshSession() helper function 2021-12-16 15:42:37 -07:00
Jason Lunz
c5e553e400
implement gh cs ssh --stdio 2021-12-16 15:42:37 -07:00
Jason Lunz
81b658ea75
use go-multierror to combine read/write close errors 2021-12-16 15:42:33 -07:00
Jason Lunz
9416056da1
allow combining os.Stdin and os.Stdout as an io.ReadWriteCloser 2021-12-16 15:41:54 -07:00
Alan Donovan
5fea604f78
gh cs cp --help: fix typo 2021-12-02 17:09:20 -05:00
Mislav Marohnić
a573eb5d80
Fix codespace code command under WSL (#4747)
The `codespace code` command used the `skratchdot/open-golang` library
to open `vscode://` URLs, which uses `xdg-open` for Linux under the
hood, which isn't available under WSL.

This switches over to using the `cli/browser` package which has explicit
support for WSL by invoking `wslview` when found.
2021-11-24 16:18:24 +00:00
Jeff Hubbard
91dc722170 Remove the default value from idle-timeout as the API takes care of it and this can override user settings 2021-11-18 11:38:26 -08:00
Jeff Hubbard
90313fbf96
Add idle timeout to cs create parameters (#4741)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-18 11:47:48 +00:00
Amanda Lin
15c8f291e4
Add prebuild availability status to create codespaces (#4737) 2021-11-17 19:41:05 +01:00
Mislav Marohnić
dae77fd398
Merge pull request #4675 from cli/docs-web-formatting
Overhaul manual pages for the web
2021-11-09 21:00:51 +01:00
Jose Garcia
8296904c26
Rename errors from Live Share to generic codespace 2021-11-08 13:35:48 +00:00
Mislav Marohnić
2c180a6338 Clean up codespace cp docs
- Examples block now moved to its own section
- Refer to flags by their full names
- Use backticks for delimiting command-line expressions
- Use double quotes for literal values
2021-11-03 15:44:09 +01:00
Mislav Marohnić
9b7d53501f Make sure URLs in man pages render as hyperlinks on the web 2021-11-03 15:39:10 +01:00
Mislav Marohnić
31ba2ea4d5
Publish codespace commands (#4606) 2021-10-25 17:38:00 +00:00
Srivatsn Narayanan
32f1ea5ec0 Update branding of VSCode in the code command 2021-10-25 16:53:28 +00:00
Mislav Marohnić
83a08aa3ba Remove unnecessary pointers to Go maps 2021-10-25 17:20:12 +02:00
Mislav Marohnić
8d9e8e317e
Merge pull request #4591 from cli/codespaces-json-export
Add export functionality to codespace commands
2021-10-25 17:10:32 +02:00
Mislav Marohnić
905cb3b9fa Touch-up codespaces exporting functionality 2021-10-25 15:45:10 +02:00
Mislav Marohnić
436762dd54 codespace create: make the branch input optional
When blank, the branch name will default to the default branch for the
repository.
2021-10-22 15:43:26 +02:00
Mislav Marohnić
3492109e12 codespace create: avoid unnecessarily fetching user 2021-10-22 14:39:21 +02:00
Mislav Marohnić
a5fa70a07d 🔥 obsolete codespace/output package 2021-10-22 14:18:10 +02:00
Mislav Marohnić
cbeb675e56 codespace ports: support --json and --template export flags 2021-10-22 14:13:43 +02:00
Mislav Marohnić
badbf515cb codespace list: support --json and --template export flags 2021-10-22 14:13:15 +02:00
Alan Donovan
2f7f224c9e
Merge pull request #4584 from cli/FlagErrorf
Add FlagErrorf; encapsulate FlagError.error
2021-10-21 14:14:05 -04:00