Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Allow scripting the terminal in TUF commands#1155

Merged
riyazdf merged 1 commit into
notaryproject:masterfrom
ecordell:allow-scripting
May 10, 2017
Merged

Allow scripting the terminal in TUF commands#1155
riyazdf merged 1 commit into
notaryproject:masterfrom
ecordell:allow-scripting

Conversation

@ecordell

@ecordell ecordell commented May 9, 2017

Copy link
Copy Markdown
Contributor

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.

Signed-off-by: Evan Cordell <cordell.evan@gmail.com>

@cyli cyli left a comment

Copy link
Copy Markdown
Contributor

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

ecordell commented May 9, 2017

Copy link
Copy Markdown
Contributor Author

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

@cyli

cyli commented May 9, 2017

Copy link
Copy Markdown
Contributor

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

@riyazdf riyazdf left a comment

Copy link
Copy Markdown
Contributor

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

riyazdf commented May 10, 2017

Copy link
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants