This repository was archived by the owner on Jul 18, 2019. It is now read-only.
Bug 1395349 - refactor signin to use new client creator, don't store - #174
Merged
Merged
Conversation
djmitche
force-pushed
the
use-client-creator
branch
3 times, most recently
from
November 6, 2017 20:38
8a827af to
3d1bd5f
Compare
jonasfj
approved these changes
Nov 6, 2017
| // 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) |
Contributor
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
}
Contributor
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
Contributor
Author
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:*" ] } ```
djmitche
force-pushed
the
use-client-creator
branch
from
November 7, 2017 13:24
3d1bd5f to
717da18
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: