aquaproj / aqua

Declarative CLI Version manager written in Go. Support Lazy Install, Registry, and continuous update with Renovate. CLI version is switched seamlessly
https://aquaproj.github.io
884 stars 39 forks source link

Need your help to verify the feature to manage GitHub Access Token using GNOME Keyring and Windows Credential Manager #3178

Open suzuki-shunsuke opened 1 month ago

suzuki-shunsuke commented 1 month ago

We have implemented the feature to manage GitHub Access Token using GNOME Keyring and Windows Credential Manager.

We have already confirmed this feature works well using macOS Keychain, but we haven't verified this feature using GNOME Keyring and Windows Credential Manager yet. We usually develop aqua on macOS, so it's hard to verify it on Windows and Linux. So we really appreciate it if you can test the feature using Windows and Linux!

You can try the feature using aqua v2.37.0-1.

aqua upa v2.37.0-1

About the detail of the feature, please see https://github.com/aquaproj/aqua/pull/3174 .

Thank you for your cooperation!

nikolay commented 1 month ago

@suzuki-shunsuke It seems that even the pre-release version has the stable version's executable, so, the new command does not work. I tried both using aqua upa and just downloading the artifact from GitHub releases and executing it directly.

suzuki-shunsuke commented 1 month ago

suzuki-shunsuke It seems that even the pre-release version has the stable version's executable, so, the new command does not work. I tried both using aqua upa and just downloading the artifact from GitHub releases and executing it directly.

Hmm. Really?

Could you check the version of aqua?

aqua -v

This is on my macOS.

$ aqua -v
aqua version 2.37.0-1 (af26af42cf361cb0c3db604bb9cde1940d5d6d68)

$ aqua help token
NAME:
   aqua token - Manage a GitHub Access Token in keyring

USAGE:
   aqua token command [command options]

If aqua-proxy doesn't execute the pre-release version, maybe you need to open a new terminal.

suzuki-shunsuke commented 1 month ago

If aqua upa v2.37.0-1 doesn't update the version, please check the path of aqua.

$ command -v aqua
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/bin/aqua

$ ls -lh "$(command -v aqua)"
lrwxr-xr-x 1 shunsukesuzuki staff 96 10 18 09:41 /Users/shunsukesuzuki/.local/share/aquaproj-aqua/bin/aqua -> ../internal/pkgs/github_release/github.com/aquaproj/aqua/v2.37.0-1/aqua_darwin_arm64.tar.gz/aqua

Note that aqua upa changes the version of $(aqua root-dir)/bin/aqua. If you install aqua by Homebrew or something, versions of them aren't updated.

nikolay commented 1 month ago

@suzuki-shunsuke You're right that on macOS only the following binary gets upgraded: ~/.local/share/aquaproj-aqua/bin/aqua, but I don't know where the binary is installed on Windows 11 to test. I looked into the AppData folder, but it still showed the old version.

suzuki-shunsuke commented 1 month ago

Windows uses hard links instead of symbolic links, but this difference doesn't matter.

This is on GitHub Actions' windows-latest.

https://github.com/aquaproj/aqua-registry/actions/runs/11397633487/job/31713386883

# aqua -v
aqua version 2.37.0-1 (af26af42cf361cb0c3db604bb9cde1940d5d6d68)

# command -v aqua
/c/Users/runneradmin/AppData/Local/aquaproj-aqua/bin/aqua

# aqua token --help
NAME:
   aqua token - Manage a GitHub Access Token in keyring

USAGE:
   aqua token command [command options]

COMMANDS:
   set      Set a GitHub access token in keyring
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

# ls /c/Users/runneradmin/AppData/Local/aquaproj-aqua/internal/pkgs/github_release/github.com/aquaproj/aqua/v2.37.0-1/aqua_windows_amd64.zip/
aqua.exe  LICENSE  README.md

aqua is installed in AppData/Local/aquaproj-aqua/internal/pkgs/github_release/github.com/aquaproj/aqua.

suzuki-shunsuke commented 1 month ago

Hmm. I tried the feature on GitHub Actions windows-latest, but it looks weird.

aqua token set succeeds, but seems that the feature doesn't work as expected. I ran aqua init and checked the debug log. aqua init should call GitHub API to get the latest release and should output the debug log about the feature, but the debug log wasn't outputted. I'm not sure why. 🤔

https://github.com/aquaproj/aqua/blob/508cc3f7bc927daae2675065daaaf333778a8480/pkg/controller/initcmd/init.go#L53

https://github.com/aquaproj/aqua/blob/508cc3f7bc927daae2675065daaaf333778a8480/pkg/github/github.go#L116-L119

https://github.com/aquaproj/aqua/blob/508cc3f7bc927daae2675065daaaf333778a8480/pkg/github/github.go#L92