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

Enable Bitbucket Access Token Authentication for Electron Builder #8204

Open
cek61 opened this issue May 6, 2024 · 0 comments
Open

Enable Bitbucket Access Token Authentication for Electron Builder #8204

cek61 opened this issue May 6, 2024 · 0 comments

Comments

@cek61
Copy link

cek61 commented May 6, 2024

  • Electron-Builder Version: 24.9.1
  • Node Version: 21.7.1
  • Electron Version: 28.2.0
  • Electron Type (current, beta, nightly): current
  • Electron Updater Version: 6.1.7
  • Target: all

Issue:
When using Bitbucket as provider for publishing it is only possible to authenticate via username and token. I would like to use a repository access token for authentication. It looks like it is not possible because the BitbucketPublisher always creates a Basic Authentication header.

Current configuration needs to be like this:

publish:
    provider: bitbucket
    owner: <owner> 
    slug: <slug>
    username: <bitbucket-username> # optional, if username != owner
    token: <bitbucket-app-password>

Why do I need this:
My Bitbucket repository is a private repository with multiple contributors. The pipeline needs to build and publish my app. I don't want to use my personal username and app password neither I want to create a technical user.

Solution:
Bitbucket provides the option to use access tokens. We would need to figure out how to pass an access token to the publish config. It should be treated as Bearer Token and not as Basic Authentication.

Approach:
Introduce a new config value named "accessToken" for new authentication method. If it is provided then always try to use it as Bearer Token.

I would like to configure the provider like this:

publish:
    provider: bitbucket
    owner: <owner> 
    slug: <slug>
    accessToken: <bitbucket-access-token>

The access token then needs to be in the request header as Bearer token. Using this method I don't need to pass a username.

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

1 participant