Commit graph

169 commits

Author SHA1 Message Date
Babak K. Shandiz
f498f2e882
fix: resolve copyloopvar issues
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-11-03 20:05:26 +00:00
Azeem Sajid
8b7fb231ec Remove trailing whitespace 2025-02-13 11:06:27 +05:00
Caleb Brose
940560acf2
Fix ssh directory 2024-11-06 16:13:29 +00:00
Caleb Brose
b4c221dfb7
Create the automatic key when specified with -i 2024-11-05 22:30:15 +00:00
Yukai Chou
d7b8ecf33d Unify use of tab indent in non-test source files
Found with
    rg '(^ | \t|\t )' -g '*.go' -g '!*_test.go'

Mixed indent exceptions:
- wrapped long list items with extra 2-space indent
- code snippets using space indent
- commented code lines having "\t*// \t+" prefix
2024-08-03 00:35:30 +08:00
David Gardiner
400db0f41b Fix linting error 2024-01-30 13:24:23 -08:00
David Gardiner
2cb044caf5 Parse SSH args before creating the shell 2024-01-30 13:16:46 -08:00
David Gardiner
8c77e53c35 Send activity signals during non-interactive codespace SSH command 2024-01-29 19:20:51 -08:00
Yukai Chou
ba585149c3 Leftovers 2023-11-23 07:12:47 +08:00
Yukai Chou
07a87ca8a4 Wrap special values and placeholders like - and $1 2023-11-23 07:09:29 +08:00
Yukai Chou
21bf1babdf Proof-reading 2023-11-17 02:04:35 +08:00
Yukai Chou
5612d2864e Add leftovers 2023-11-17 01:32:29 +08:00
Yukai Chou
8eec3e8040 Wrap path to file in backticks 2023-11-17 01:32:29 +08:00
Yukai Chou
b70c28ba20 Misc docs improvements 2023-11-17 01:32:28 +08:00
David Gardiner
581b6652e2 Resolve race condition in codespaces connection 2023-10-31 12:19:14 -07:00
David Gardiner
64f4660ec7
Migrate all Codespaces operations from Live Share to Dev Tunnels (#8149)
* Migrate all Codespaces operations from Live Share to Dev Tunnels

* Remove Live Share references

* Fix linting errors

* Update comments, remove deps, add uint16 bound checks

* Fix tests and move keep-alive logic to forwarder

* Address comments

* Updated mock port forwarder

* Fix CodeQL error

* Update comment

* Update func name

* Add missing connection close

* Fix linting error

* https -> http

* Update defer

* Fix tests
2023-10-12 22:16:36 +00:00
Jose Garcia
37d8e9e915 Support --server-port behavior with conn details 2023-07-02 20:55:56 -04:00
Caleb Brose
09e86d0ebf
Fix gh cs ports requiring sudo for privileged port numbers (#7326) 2023-04-19 07:00:44 -05:00
John Keech
4b5a9032fe
Clarify how SSH keys are selected (#7325)
Fixes: https://github.com/orgs/community/discussions/52556

Update the help text for `gh codespace ssh` to provide more details about how SSH keys are selected.
2023-04-17 10:19:03 -07:00
Caleb Brose
27a3fcc807 Fix invoker immediately closing 2023-04-05 19:33:50 -05:00
Mislav Marohnić
1933fc2f69
codespace ssh: fix "connection reset by peer" 2023-03-09 15:14:39 +01:00
JP Ungaretti
39a1dc90af Match return style 2023-03-07 19:05:49 +00:00
JP Ungaretti
c347737ace Fix build errors 2023-03-07 18:47:27 +00:00
JP Ungaretti
5a7f779cf7 Merge branch 'trunk' into jungaretti/fix-jupyter-spinner 2023-03-07 18:43:34 +00:00
Caleb Brose
57c73e8239
Add --repo filter to more gh codespaces commands (#6669)
* Add --repo flag to commands

* Example of using common args

* Add -r to stop

* Add validation to the add helper

* Skip prompt for single option

* Migrate (mostly) everything to addGetOrChooseCodespaceCommandArgs

* Fix typo in logsCmd

* Use R instead of r

* Update a couple -r usages

* Refactor to codespace_selector

* Clean up selector, apply it in a couple examples

* Use apiClient instead in constructor

* Restore addDeprecatedRepoShorthand

* Finish implementing the commands

* Update existing tests to use the selector

* Add tests for selector

* linter

* Catch case where there's no conflict

* Make the flag persistent for ports

* Add support to stop
2023-02-22 17:16:36 -06:00
JP Ungaretti
a388358348 Merge branch 'trunk' into jungaretti/fix-jupyter-spinner 2023-02-09 23:18:22 +00:00
JP Ungaretti
bc789b2787 Adopt in ssh.go 2023-02-09 22:53:48 +00:00
Caleb Brose
2b95cbc5a6 Close port forward writer on reader 2023-01-19 20:22:24 -06:00
JP Ungaretti
5879923b4f Use progress runner a few times 2023-01-12 22:56:33 +00:00
David Gardiner
ce6b7d8762 Start SSH server with gRPC 2023-01-10 11:59:56 -08:00
David Gardiner
814fcf8c74 Remove unused token field 2023-01-06 09:56:16 -08:00
David Gardiner
000a84d49b Address comments 2023-01-04 15:33:33 -08:00
David Gardiner
731ba682f2 Create Invoker object 2023-01-04 14:41:25 -08:00
David Gardiner
1e75a74d18 Create centralized Codespaces RPC invoker 2023-01-04 14:41:25 -08:00
Anthony Fok
f6d0f82701
Fix missing text in gh-codespace-ssh.1 man page
Rearrange the long help text so that '--config' does not appear at the
start of a line which groff interprets as an undefined macro and skips
the content of that whole line.

To reproduce:

  $ go run cmd/gen-docs/main.go --man-page --doc-path /tmp/gh-manpages
  $ man --warnings -E UTF-8 -l -Tutf8 -Z /tmp/gh-manpages/gh-codespace-ssh.1 >/dev/null
  troff: <standard input>:26: warning: macro '--config'' not defined

Discovered by the Debian Lintian tool.
2022-09-28 14:00:37 -06:00
Caleb Brose
bb6db4b309 PR suggestions 2022-09-20 22:00:27 +00:00
Caleb Brose
4a8047ed61 Improve error handling 2022-09-20 19:36:07 +00:00
Caleb Brose
deedd35a2c Merge branch 'cmbrose/no-ssh-api-call' of https://github.com/cli/cli into cmbrose/no-ssh-api-call 2022-09-20 18:32:01 +00:00
Caleb Brose
373634ad75 Rename to generateAutomaticSSHKeys 2022-09-20 18:32:00 +00:00
Caleb Brose
045bb54157
Apply suggestions from code review
Co-authored-by: Jose Garcia <josebalius@github.com>
2022-09-20 13:22:38 -05:00
Caleb Brose
3b52df6f99 Don't add private key for -i 2022-09-20 15:21:59 +00:00
Caleb Brose
dba1259d32 Update tests 2022-09-20 01:02:06 +00:00
Caleb Brose
0c00ca911e Clean up API interface 2022-09-16 22:25:11 +00:00
Caleb Brose
939c7c71cd Remove API call for ssh keys 2022-09-16 22:22:13 +00:00
Caleb Brose
6b24949649
Merge pull request #5958 from cli/cmbrose/no-auto-key-if-uploaded
Check for already configured ssh keys before using automatic key
2022-08-23 12:09:16 -05:00
Caleb Brose
d8b06ae8af Add check to -i short circuit for the automatic key 2022-08-16 10:15:43 -05:00
Eljo George
54e5673bd6 remove blank spaces 2022-08-12 21:04:21 +00:00
Eljo George
9f1f74c30a SSH help text to suggest the new features syntax 2022-08-12 21:00:57 +00:00
Caleb Brose
c781ea520a Better .ssh directory 2022-08-10 14:29:14 -05:00
Caleb Brose
3d45244dcc Add -i option to the proxy ssh call in config 2022-08-10 10:57:34 -05:00