Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

support for ssh-key-less upload#28

Open
anaderi wants to merge 1 commit into
mbostock:masterfrom
anaderi:master
Open

support for ssh-key-less upload#28
anaderi wants to merge 1 commit into
mbostock:masterfrom
anaderi:master

Conversation

@anaderi

@anaderi anaderi commented Mar 7, 2016

Copy link
Copy Markdown

ssh key for upload gist is a bit of luxury in CI (travis) environment. and actually it is not needed, since we have API token. so if user specifies 'protocol' in config file to be 'https', gistup will be able to upload the contents just by https after applying the PR.

Comment thread bin/gistup
child.exec("git remote add --track master " + quote.single(argv.remote) + " git@gist.github.com:" + id + ".git", function(error, stdout, stderr) {
function gitRemoteAdd(id, settings, callback) {
url = "git@gist.github.com:" + id + ".git"; // default
if (/^https$/i.test(settings.protocol)) url = "https://" + settings.user + ":" + settings.token + "@gist.github.com/" + id + ".git";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

settings.user is not needed, you can simply construct the URL as: https://TOKEN@gist.github.com

@rninne

rninne commented Oct 4, 2017

Copy link
Copy Markdown

+1 for adding the https protocol. Having 2fa on your account also restricts using ssh without the ssh passphrase. This solution works well with 2fa enabled.

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.

2 participants