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

Bintray configuration doesn't support bintray organizations #848

Closed
jimm1419 opened this issue Oct 24, 2016 · 4 comments · Fixed by #855 · May be fixed by qcif/data-curator#563
Closed

Bintray configuration doesn't support bintray organizations #848

jimm1419 opened this issue Oct 24, 2016 · 4 comments · Fixed by #855 · May be fixed by qcif/data-curator#563

Comments

@jimm1419
Copy link
Contributor

  • Version: 7.14.2
  • Target: macOS & Win NSIS

Currently BintrayClient does not support bintray accounts with organizations, using the same value owner for authentication and api URL's.

In the case of a bintray account with an organization, the api URL and user is different.

this.auth = apiKey == null ? null : `Basic ${ new Buffer(`${ owner }:${ apiKey }`).toString("base64") }`;
this.basePath = `/packages/${ this.owner }/${ this.repo }/${ this.packageName }`;

would probably be something like this:

this.auth = apiKey == null ? null : `Basic ${ new Buffer(`${ user }:${ apiKey }`).toString("base64") }`;
this.basePath = `/packages/${ this.owner }/${ this.repo }/${ this.packageName }`;
jimm1419 added a commit to jimm1419/electron-builder that referenced this issue Oct 25, 2016
Added a user field to BintrayOptions to use for bintray authentication instead of the 'owner' field.

Closes electron-userland#848
@develar
Copy link
Member

develar commented Oct 25, 2016

👍 Please file PR. https://www.appveyor.com/docs/deployment/bintray/ — appveyor calls it subject but I like your solution. Github API key doesn't require username (only key), but Bintray requires user name. So, your naming is correct and 👍

@jimm1419
Copy link
Contributor Author

jimm1419 commented Oct 26, 2016

Hi @develar .. I'll be happy to file the PR, but I'm having a problem getting the build to work. The BintrayPublisher now successfully authenticates and uploads the file to bintray, but after I receive the follow error ... any ideas on what it could be?? It seems to be a problem with bluebird but I have not seen any bugs filed related to this.

[package] Building NSIS installer
[package] 
[package] Signing t-4b52-0-uninstaller.exe (certificate file "build/xxxx.p12")
[package] Signing XpressUpdateDev Setup 4.0.0-beta.exe (certificate file "build/xxxx.p12")
[package] Creating Bintray Publisher ��� user: xxxx, package: xxxxx, repository: generic, version: 4.0.0-beta
[package] 
[package] /tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/generators.js:64
[package]         this._finallyPromise._fulfill();
[package]                             ^
[package] TypeError: Cannot read property '_fulfill' of undefined
[package]     at PromiseSpawn._cleanup (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/generators.js:64:29)
[package]     at PromiseSpawn._continue (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/generators.js:144:14)
[package]     at PromiseSpawn._promiseFulfilled (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/generators.js:99:10)
[package]     at Promise._settlePromise (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/promise.js:572:26)
[package]     at Promise._settlePromise0 (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/promise.js:612:10)
[package]     at Promise._settlePromises (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/promise.js:691:18)
[package]     at Async._drainQueue (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/async.js:138:16)
[package]     at Async._drainQueues (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/async.js:148:10)
[package]     at Immediate.Async.drainQueues [as _onImmediate] (/tvx/workspace/client/pas-clients/pas-client-electron/node_modules/bluebird/js/release/async.js:17:14)
[package]     at processImmediate [as _immediateCallback] (timers.js:383:17)

@develar
Copy link
Member

develar commented Oct 26, 2016

@jimm1419 It was fixed today morning. Please update sources.

@jimm1419
Copy link
Contributor Author

@develar Nice, thanks!

jimm1419 added a commit to jimm1419/electron-builder that referenced this issue Oct 27, 2016
The log message outputs the correct user being used to hit the bintray API, 'user' field if defined, if not 'owner'.

electron-userland#848
develar pushed a commit that referenced this issue Oct 27, 2016
* fix: bintray configuration support for organizations

Added a user field to BintrayOptions to use for bintray authentication instead of the 'owner' field.

Closes #848

* chore: update bintray log message to output correct user

The log message outputs the correct user being used to hit the bintray API, 'user' field if defined, if not 'owner'.

#848
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants