Code-settings-sync: Unnecessary asking for github-token at first download settings

Created on 12 Dec 2017  路  22Comments  路  Source: shanalikhan/code-settings-sync

Visual Studio Code Version : 1.18.1
Code Settings Sync Version : 2.8.7
Operating System : Ubuntu 16.04
Occurs On: Download
Proxy Enabled: No
GIst Id: [ ID_HERE ]

Since the last update of this plugin to 2.8.7 I will be asked for Github-Token when doing the first download. This is really unnecessary. Before the last update we had one gist and each of us had only to enter the gist-id to get the current settings. That worked like a charme. Now, each of us must enter the github-token which is really not needed if you only want to download.
Please make that as default again.

Most helpful comment

There is no reason to create another config item.

Only ask for the token when the user is trying to upload the configs and there is no previous token set.

This way, will be easier to the users that only wants to download the configs from someone else, and requires no additional steps, only hit download and paste the GIST id.

All 22 comments

Actually there are users which gets confused and put token in gist place in code and extension fails for them.
Either the documentation needs to improve or on boarding experience needs to improve.
thats the reason i had to do that to make process consistent.

I can add some setting which you can turn off in order to step asking token every time on download if you dont need to upload it.

(https://github.com/shanalikhan/code-settings-sync/issues/461)

I plead for some settings that anyone can turn on and the default should be off, alone because of compatibility reasons. The reason is that we build virtual machines for our developers via script. We only install this plugin via code --install-extension Shan.code-settings-sync and do the roll out. Each developer loads the settings from one gist and and has no need to have a github-token.

We only install this plugin via code --install-extension Shan.code-settings-sync and do the roll out.

How do you place the gist via script or just ask developers to place it manually ?

Yep, the developers place it manually. So each developer has the possiblity to use a gist containing his favorit settings or the settings of particular project or ....

Actually if the gist is public, there is no reason to ask for the token.

I'm currently maintaining a central gist where all the members of my team are using the same GIST, and they are only downloading the configs, not uploading.

And without a Token, the plugin is not working.

The solution i see ( oher then removing the token) is the users who only need to download the gist needs to enable some setting in syncLocalSetting.json file like allowUpload to false and it will only allow user to download the settings.

There is no reason to create another config item.

Only ask for the token when the user is trying to upload the configs and there is no previous token set.

This way, will be easier to the users that only wants to download the configs from someone else, and requires no additional steps, only hit download and paste the GIST id.

By the way, I have just tried syncing the settings already uploaded from another machine and failed because I pasted the wrong thing in the wrong place... (yeah, please remove the step to insert the token when only downloading..)

Now, I can't even start from scratch, as the extension still thinks I have the wrong token code... How to get back to original state? Reinstalling the extension does not help..

Reinstalling the extension does not help

@bzx
Reset the extension settings from command.
Or put the token manually @ https://github.com/shanalikhan/code-settings-sync#customized-sync

Thanks, I figured.. I didn't RTFM properly.

Any updates on this as I'm trying to download a public GIST but it's constantly asking me for an access token which completely goes against the idea of the public GIST. I'll set one up to get rid of this prompt but how are we meant to share settings?

Andy

Same here. Just installed the extension and created a public gist to share, now I go to the other machine to download it, and it prompts me for the token. But I just want to paste in the id for the public gist. I don't even see a workaround because gist id is not listed in syncLocalSettings.json. Unless I'm missing something, downloading settings from a public gist is broken. (version 2.8.7)

I'm having this issue too and it's quite frustrating. I have a PC I want to upload the settings from but a couple of other PCs I only want to mirror the setup to, and thus only need to download the gist. I shouldn't need a token to do this -- in fact, it is something I am intentionally aiming to avoid.

can you guys set sync.anonymousGist to true and let me know if it worked.
It will always download the settings without asking token on other computer but upon uploading, it will create new gist.

@shanalikhan I already tried this on a new machine and it's still asking for the token

https://github.com/shanalikhan/code-settings-sync#customized-sync

Set downloadPublicGist to true and it will not ask for token.
Although this part was not required, but i had to write code intentionally.

From the version 2.0+ i kept GitHub token hidden when downloading the Gist as it was not required.
Since then I kept receiving many twitter messages, github issues and email that user are inserting github Token on GIST dialog in code when downloading and then Settings Sync fails for them.
To make the download process consistent with upload process ( Token and Gist ID ) i have to revert it.

If your processes are automated you can set this flag to true to let team members use Settings Sync for download only purposes.

To keep the details handy, I have written the detailed post on configurations
https://medium.com/@itsShanKhan/visual-studio-code-settings-sync-configurations-ed8dd6fd9753

let me know if you face this problem even setting configuration.

What can be done is to provide ask user mode something like "Fetch Only" or "Upload / Download" on Code start and it will do things automatically.
Your suggestions are welcome !

Duplicate of #487

@shanalikhan We have still this point as a painful issue. Why is it not possible to do the download only with a gist-id. Maybe you can give more useful hints at the gist-id and github-token-inputfield or you add possibility to skip the github-token-inputfield on download or leave it empty.
But whatever you hopefully do on this issue please do it without the need of any configuration. The jumping point on this awesome plugin is the zero-config possibility on startup of a fresh VSCode installation.

I have then same problem.
error in developer tools

TypeError: Cannot read property 'gists' of null
    at module.exports.t.GitHubService.<anonymous> (C:\Users\R09857\.vscode\extensions\shan.code-settings-sync-3.2.7\out\extension.js:14:32313)
version:3.2.7

I have then same problem.
error in developer tools

TypeError: Cannot read property 'gists' of null
    at module.exports.t.GitHubService.<anonymous> (C:\Users\R09857\.vscode\extensions\shan.code-settings-sync-3.2.7\out\extension.js:14:32313)

version:3.2.7

Me too, but in the current version 3.2.8 on Windows 10 and Linux.

It will be fixed in next version.
If you guys want to test the upcoming build.
Check from here
https://github.com/shanalikhan/code-settings-sync/issues/816#issuecomment-481623181

It will be fixed in next version.
If you guys want to test the upcoming build.
Check from here
#816 (comment)

Thank you very much but it is not working completely. Did not download all my synced plugins and did not remove the old ones. But you could help me here.
Waiting for the new release ...

Was this page helpful?
0 / 5 - 0 ratings