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

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

Open
suzuki-shunsuke opened this issue Oct 13, 2024 · 6 comments

Comments

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Oct 13, 2024

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 #3174 .

Thank you for your cooperation!

@suzuki-shunsuke suzuki-shunsuke added enhancement New feature or request and removed enhancement New feature or request labels Oct 13, 2024
@suzuki-shunsuke suzuki-shunsuke pinned this issue Oct 13, 2024
@nikolay
Copy link

nikolay commented Oct 17, 2024

@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
Copy link
Member Author

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
Copy link
Member Author

suzuki-shunsuke commented Oct 18, 2024

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
Copy link

nikolay commented Oct 18, 2024

@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
Copy link
Member Author

suzuki-shunsuke commented Oct 18, 2024

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

This is on GitHub Actions' windows-latest.

https:/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
Copy link
Member Author

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. 🤔

release, _, err := c.github.GetLatestRelease(ctx, logE, "aquaproj", "aqua-registry")

aqua/pkg/github/github.go

Lines 116 to 119 in 508cc3f

func (g *GitHub) GetLatestRelease(ctx context.Context, logE *logrus.Entry, repoOwner, repoName string) (*github.RepositoryRelease, *github.Response, error) {
g.init(ctx, logE)
return g.repo.GetLatestRelease(ctx, repoOwner, repoName) //nolint:wrapcheck
}

logE.Debug("got a GitHub Access token from keyring")

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

No branches or pull requests

2 participants