Bug 1395349 - refactor signin to use new client creator, don't store#174
Conversation
8a827af to
3d1bd5f
Compare
jonasfj
left a comment
There was a problem hiding this comment.
So this effectively solve these probably we had with AWS... for TC..
| // Open browser | ||
| fmt.Fprintln(cmd.OutOrStdout(), "Listening for a callback on: "+target) | ||
| fmt.Fprintln(cmd.OutOrStdout(), "Opening URL: "+loginURL) | ||
| fmt.Fprintln(cmd.OutOrStderr(), "Listening for a callback on: "+callbackURL) |
There was a problem hiding this comment.
So one would write:
alias taskcluster-login="eval `taskcluster login`"even better:
taskcluster() {
if [[ $@ == "login" ]]; then
eval `taskcluster login`
else
taskcluster "$@"
fi
}There was a problem hiding this comment.
Could we make an argument like taskcluster login --setup that will install this in /etc/bash_completion.d/ or maybe we can integrate it with the bash completion we have.. (not sure if this abuse of bash_completion).
Or at-least have a section in taskcluster help login that explains how to create these and add them to .bashrc
There was a problem hiding this comment.
I don't want to mess with shell completion. And that function needs some work to properly find the path to taskcluster and not invoke itself recursively (and also to use taskcluster signin not taskcluster login). I think an alias is simpler.
It's best to encourage users to not keep TC credentials on disk, so this writes them out as env vars instead. The result will still *read* from `~/.config/taskcluster.yml`, just not write to it. Example: ``` dustin@jemison $ eval $(./taskcluster signin --scope 'queue:*') Starting Listening for a callback on: http://localhost:33459 Opening URL: https://tools.taskcluster.net/auth/clients/new?name=cli&description=Temporary+client+for+use+on+the+command+line&scope=queue:*&expires=1d&callback_url=http%3A%2F%2Flocalhost%3A33459 Credentials recorded as environment variables dustin@jemison $ ./taskcluster api auth currentScopes { "scopes": [ "queue:*" ] } ```
3d1bd5f to
717da18
Compare
It's best to encourage users to not keep TC credentials on disk, so this
writes them out as env vars instead. The result will still read from
~/.config/taskcluster.yml, just not write to it.Example: