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

SDM local mode ignores token configuration value #215

Closed
ddgenome opened this Issue Nov 9, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@ddgenome
Copy link
Member

ddgenome commented Nov 9, 2018

When running in local mode, the token configuration value is ignored when cloning seed repositories.

✘ Command failure
Child process 32418 exited with non-zero status 128: . ==> git 'clone' 'https://undefined:x-oauth-basic@github.com/atomistxx/spring-rest.git' '/tmp/atm-32418-32418h308owt6hbZA'
Cloning into '/tmp/atm-32418-32418h308owt6hbZA'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://undefined:x-oauth-basic@github.com/atomistxx/spring-rest.git/'

@ddgenome ddgenome added the bug label Nov 9, 2018

@ddgenome ddgenome self-assigned this Nov 9, 2018

@ddgenome

This comment has been minimized.

Copy link
Member Author

ddgenome commented Nov 9, 2018

Per @cdupuis, "Probably an issue in EnvironmentTokenCredentialsResolver."

@ddgenome

This comment has been minimized.

Copy link
Member Author

ddgenome commented Nov 9, 2018

It looks like the parameters object passed to the generator handler needs target.credentials.token to be defined and that is not being populated.

@ddgenome

This comment has been minimized.

Copy link
Member Author

ddgenome commented Nov 9, 2018

Public repos work incidentally even though the command being run contains the undefined token:

Child process exited with code 0 and signal null: . ==> git 'clone' 'https://undefined:x-oauth-basic@github.com/atomist-seeds/kotlin-rest.git'
@ddgenome

This comment has been minimized.

Copy link
Member Author

ddgenome commented Nov 9, 2018

Which is a bit odd, using the target credentials to clone the seed/source.

@ddgenome

This comment has been minimized.

Copy link
Member Author

ddgenome commented Nov 9, 2018

The proper credential resolver ends up in the SDM config.

@ddgenome

This comment has been minimized.

Copy link
Member Author

ddgenome commented Nov 9, 2018

But in the parameters passed to the command handler, the github parameters do not get resolved properly: {"name":"github://user_token?scopes=repo,user:email,read:user","value":null}.

@ddgenome ddgenome assigned johnsonr and unassigned ddgenome Nov 9, 2018

@ddgenome

This comment has been minimized.

Copy link
Member Author

ddgenome commented Nov 9, 2018

Any change you could take a look at this @johnsonr ?

@ddgenome

This comment has been minimized.

Copy link
Member Author

ddgenome commented Nov 9, 2018

Perhaps we should set this to the value of the token resolved by the EnvironmentTokenCredentialsResolver?

{ name: "github://user_token?scopes=repo,user:email,read:user", value: null },

@cdupuis cdupuis assigned cdupuis and unassigned johnsonr Nov 13, 2018

@cdupuis cdupuis added the blocker label Nov 13, 2018

@cdupuis cdupuis closed this in #216 Nov 13, 2018

atomist-bot added a commit that referenced this issue Nov 13, 2018

Changelog: #215 to fixed
[atomist:generated]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment