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

Allow scripting the terminal in TUF commands #1155

Merged
merged 1 commit into from
May 10, 2017

Conversation

ecordell
Copy link
Contributor

@ecordell ecordell commented May 9, 2017

This change came in here: 25cd29c

But I can't really tell why. It breaks scripting tuf commands (if you're not running in a terminal, all requests are anonymous to the server).

I think #861 is the proper solution, but for now it's nice to be able to script it via stdin.

Copy link
Contributor

@cyli cyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... I don't really remember why either, although I have a hazy memory that we decided if not in a terminal we can use env vars. I don't know if I am just making this up after the fact though.

This LGTM, thanks for fixing.

ping @endophage and @riyazdf to see if their memory is better than mine :)

@ecordell
Copy link
Contributor Author

ecordell commented May 9, 2017

Can you use ENV vars for setting username/password and not just key passphrases?

@cyli
Copy link
Contributor

cyli commented May 9, 2017

@ecordell Ah blah, sorry, you're right the auth info cannot be set via ENV vars.

Copy link
Contributor

@riyazdf riyazdf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @ecordell!

We have a similar !terminal.IsTerminal(int(os.Stdin.Fd())) clause for key passphrases but since we have env vars there it makes sense to keep it as-is :)

@riyazdf
Copy link
Contributor

riyazdf commented May 10, 2017

jenkins failure looks unrelated, kicking off tests again now

@riyazdf riyazdf merged commit 3ed55fe into notaryproject:master May 10, 2017
@ecordell ecordell deleted the allow-scripting branch June 7, 2017 13:51
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

Successfully merging this pull request may close these issues.

5 participants