Stéphane Graber
f3007efb9e
incus: Don't persist INCUS_REMOTE as the default remote
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-07-17 17:03:58 -04:00
Stéphane Graber
f843eaf2ae
shared/cliconfig: Use platform-specific config directory
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-25 11:28:05 -04:00
augustodsgv
f2dab164b6
incus/keepalive: Fix comment typo
...
Signed-off-by: augustodsgv <augustodsgv@gmail.com>
2026-06-13 23:02:35 -04:00
Stéphane Graber
6728a1eafc
global: Update for go-yaml/v4 rc5
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-10 22:26:22 -04:00
Stéphane Graber
f830526711
shared/cliconfig: Remove duplicate file closing
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-10 11:25:56 -04:00
Stéphane Graber
6e887997ff
shared/cliconfig: Log deferred errors with WarnOnError
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-06 19:15:10 -04:00
Stéphane Graber
dc4f57c57d
global: Clean latest gofumpt
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-06-05 01:56:18 -04:00
Benjamin Somers
eb79979573
incus: Keep track of last working remote
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-05-27 19:35:26 +00:00
Benjamin Somers
19ce43ffd4
incus/remote: Add support for multiple URLs
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-05-27 19:31:13 +00:00
Stéphane Graber
40dd4f151d
Rewrite Go import path to v7
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-05-02 01:18:25 +02:00
Benjamin Somers
a14ec478be
shared/cliconfig: Drop legacy <remote> syntax
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-04-29 14:21:39 +00:00
Stéphane Graber
efc0c11e16
shared/cliconfig: Switch io.Copy to util.SafeCopy
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-04-18 15:42:34 -04:00
Stéphane Graber
a74d566c0f
shared/cliconfig: Switch to go-yaml/v4
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-03-31 16:14:26 -04:00
Benjamin Somers
c37b9bf7cc
shared/cliconfig: Avoid treating = as part of a remote name
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-03-30 19:31:25 +00:00
Stéphane Graber
5068001c23
shared/cliconfig: Add support for encrypted TLS keys to keepalive proxy
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-03-27 01:19:21 -04:00
Stéphane Graber
ff17bc7c78
shared/cliconfig: Implement TLS cert/key/ca caching
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-03-27 01:19:20 -04:00
Stéphane Graber
12dda5c91a
shared/cliconfig: Shorten path to using keepalive proxy
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-03-27 01:19:19 -04:00
Benjamin Somers
61f64e8ba1
incus: Add no_color config key
...
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
2026-03-23 21:59:26 +00:00
Stéphane Graber
51e416c7ef
shared/cliconfig: Add lock to prevent panic
...
We were getting occasional panics on bulk actions when using OIDC
authentication.
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-03-01 03:30:52 -05:00
Stéphane Graber
36ad2cbcbc
shared/cliconfig: Don't pass scheme to OCI creds helper
...
Closes #2876
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2026-02-04 16:24:23 +01:00
Mahesh Punjabi
22f8e7aaa9
incus/console: Add default console command in configuration file
...
Closes #2054
Signed-off-by: Mahesh Punjabi <mahesh.punjabi86@gmail.com>
2025-08-09 23:34:23 -04:00
Stéphane Graber
98ff1b29d6
shared/cliconfig: Introduce GetClientCertificate
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-07-31 13:42:18 -04:00
Cory Chang
f3d069037b
shared/cliconfig: Add support for credentials helper
...
Signed-off-by: Cory Chang <ccory2004@gmail.com>
2025-07-29 01:53:35 -04:00
Nathan Chase
ed5778e5ef
shared/cliconfig: Don't needlessly use format string functions
...
Signed-off-by: Nathan Chase <ntc477@utexas.edu>
2025-05-23 01:43:38 -04:00
JUN JIE NAN
63dd751c87
shared/cliconfig: Simplify code by using modern constructs
...
Using more modern features of Go, such as:
- conditional assignment -> built-in min or max in go1.21,
- sort.Slice -> slices.Sort in go1.21,
- loop assign map -> maps.Copy in go1.21,
- []byte(fmt.Sprintf...) -> fmt.Appendf(nil,...) in go1.19,
- strings.HasPrefix / strings.TrimPrefix -> strings.CutPrefix in go1.20
Signed-off-by: JUN JIE NAN <nanjunjie@gmail.com>
2025-05-17 12:33:05 -04:00
Anthony Rojas
60fca88f4f
shared/cliconfig: Added DefaultSettings to Config Struct
...
Signed-off-by: Anthony Rojas <anthony.rojas@utexas.edu>
2025-05-02 20:41:43 -04:00
JUN JIE NAN
349272181b
Fix reference passing when yaml unmarshal
...
For example:
metadata := new(api.ImageMetadata) // type: *api.ImageMetadata
err = yaml.Unmarshal(content, &metadata)
It works on `yaml.v2` and `yaml.v3` but not work under `goccy/go-yaml`, and
`goccy/go-yaml` behavior is correct. So fixed it and add test cases to pretect.
Signed-off-by: JUN JIE NAN <nanjunjie@gmail.com>
2025-04-24 00:40:13 -04:00
Stéphane Graber
25aa59aaf5
shared/cliconfig: Make golangci-lint clean
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-04-03 00:10:32 -04:00
Colin Watson
4221663596
shared: Fix spelling errors found by codespell
...
Signed-off-by: Colin Watson <cjwatson@debian.org>
2025-03-18 14:51:49 -04:00
Stéphane Graber
7dd40724e0
shared/cliconfig: Fix gofumpt
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2025-03-17 20:56:29 -04:00
Stéphane Graber
d1c5c1bad9
Merge pull request #1385 from montag451/aliases-comp
...
incus: Add aliases completion
2024-11-25 15:17:31 -05:00
montag451
a168b36915
shared/cliconfig: Improve configuration loading
...
If the path given to LoadConfig is empty, LoadConfig tries to figure
out the configuration path automatically.
Signed-off-by: montag451 <montag451@laposte.net>
2024-11-25 16:06:26 +01:00
Stéphane Graber
6a0bcd76ec
global: Initial goimports run
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-11-19 17:32:18 +00:00
montag451
2429561cd0
Use util.CloneMap where appropriate
...
Signed-off-by: montag451 <montag451@laposte.net>
2024-11-19 10:34:36 +01:00
Stéphane Graber
1f2de2fee0
shared/cliconfig: Add CacheDir
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-08-08 02:25:29 -04:00
Stéphane Graber
0a9899b1ca
shared/cliconfig: Add OCI remote support
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-07-11 11:21:20 -04:00
Stéphane Graber
d4fa1b228e
shared/cliconfig: Always fill in the protocol
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-06-05 16:49:14 -04:00
Stéphane Graber
6518c164a6
shared/cliconfig: Generalize logic
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-06-04 16:04:00 -04:00
Stéphane Graber
00089be93c
shared/cliconfig: Remove old migration logic
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-06-04 16:03:49 -04:00
Stéphane Graber
09dc3e60bc
global: Update Go package to v6
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-04-05 11:11:11 -04:00
Stéphane Graber
6d8e5af346
shared/cliconfig: Bump zitadel/oidc to v3
...
Closes #673
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-03-26 20:43:15 -04:00
Stéphane Graber
7beea2acba
shared/cliconfig: Ensure client certificate key is 0600
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-03-21 16:06:32 -04:00
Stéphane Graber
3789cd7a0c
shared/cliconfig: Support per-remote client certificates
...
Closes #550
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-03-20 13:31:04 -04:00
Stéphane Graber
ba68447e8d
shared/cliconfig: Add HasRemoteClientCertificate
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-03-20 13:31:03 -04:00
Stéphane Graber
d6d35a77a5
shared/cliconfig: Copy clientcerts on remote copy
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-03-20 13:23:55 -04:00
Thomas Hipp
16095c9721
Replace util.ValueInSlice with slices.Contains
...
Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
2024-02-23 22:28:37 +01:00
Stéphane Graber
976e14e81c
shared/cliconfig: Fix static analysis
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-02-10 20:09:58 -05:00
Stéphane Graber
e40abf7c65
shared/cliconfig: Support SSH encrypted keys
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-02-10 17:06:52 -05:00
Stéphane Graber
f440df3629
shared/cliconfig: Improve error handling
...
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
2024-01-06 18:42:11 -05:00
Fabian Mettler
3c07aba407
shared: Fix comments typo
...
Signed-off-by: Fabian Mettler <dev@maveonair.com>
2023-12-20 13:28:00 +01:00