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

PowerShell user profile script output causes false error when getting password from keystore #116

Open
gdawson-vauto opened this issue Jun 17, 2019 · 0 comments

Comments

@gdawson-vauto
Copy link

gdawson-vauto commented Jun 17, 2019

Windows PowerShell
alks sessions open

In developer.js line 99: clortho.getFromKeychain(ALKS_USERID) an error is returned if the PowerShell user profile script writes to stdout/err (not sure which).

In my profile script, I had Start-SshAgent -Quiet which was writing Identity added: C:\Users\gdawson/.ssh/id_rsa (C:\Users\gdawson/.ssh/id_rsa). This is being caught as an error on line 109 (in devloper.js: exports.getPasswordFromKeystore).

Workaround: Don't output within profile script
Suggested: Would it be better to run the PowerShell command with no profile? Would require PR to clortho.

Example: (I added the gpfk>ipss>err log)

D:\git\openSource\alks-cli\node_modules\clortho [master ≡ +0 ~3 -0 !]> alks sessions open --verbose                                                                                                                         ALKS v3.0.3
[sessions-open]: getting developer
[sessions-open]: getting auth
[developer]: checking for access token
[developer]: no access token found, falling back to password
[developer]: gpfk>ipss>err: Error: Identity added: C:\Users\gdawson/.ssh/id_rsa (C:\Users\gdawson/.ssh/id_rsa)

[developer]: no password found, prompting user
[developer]: getting password from prompt
? Password [hidden] [input is hidden]
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