code-settings-sync icon indicating copy to clipboard operation
code-settings-sync copied to clipboard

invalid gist id

Open agne-a-t opened this issue 9 years ago • 22 comments

Visual Studio Code Version : 1.15.1 Code Settings Sync Version : 2.8.3 Operating System : [ win10 ] Occurs On: [ Download ] Proxy Enabled: [ No ] GIst Id: d02a0d9368037db46ea3df8e22c6316f87ba2596

Hello I have an error after entering gist on another vscode. I checked gist and it is fine and is accessible via username/gist url.
Sync : Invalid Gist Id Entered. Verify your gist : https://gist.github.com/<your_userName>/<gist_id>. Where it tries to take that userName from?

agne-a-t avatar Aug 22 '17 19:08 agne-a-t

Check here in the URL : https://gist.github.com/agne-a-t/d02a0d9368037db46ea3df8e22c6316f87ba2596

There is no Gist.

shanalikhan avatar Aug 22 '17 19:08 shanalikhan

Me too this gist is working: https://gist.github.com/liucan89096/78c422cd0bb4ce494e370ebdfe91089abec8add3

But it's not working for code-settings-sync

These are my keys: GITHUB TOKEN: 78c422cd0bb4ce494e370ebdfe91089abec8add3 GITHUB GIST: 3d4f56564770588e03fb1d5d7e76b3bf GITHUB GIST TYPE: Secret

nerdmax avatar Aug 23 '17 11:08 nerdmax

@liucan89096

GITHUB TOKEN: 78c422cd0bb4ce494e370ebdfe91089abec8add3

You have set gist value as TOKEN

shanalikhan avatar Aug 23 '17 11:08 shanalikhan

shanalikhan - but how it can be - i installed sync plugin, once uploaded for first time i was asked for gist. I entered it and uploaded everything. All works on that machine. So why gist is not uploaded because you can see all settings is stored there?

agne-a-t avatar Aug 25 '17 12:08 agne-a-t

what is your uploaded Gist URL. Can you see from the gist and share the url uploaded

shanalikhan avatar Aug 25 '17 14:08 shanalikhan

Hmmm interesting scenario happened can you explain how? I created gist following your manual I stored that gist for future use it was (d02a0d9368037db46ea3df8e22c6316f87ba2596) On source machine i uploaded settings for first time entering that gist (shown over) On target machine I installed sync plugin and tried to download using same gist Later I i find out that in sync settings under sync.gist there is completely different gist: 4d0dd50707241eec170f3c6cd6c1ea10 It seams like d02a0d9368037db46ea3df8e22c6316f87ba2596 ( https://gist.github.com/agne-a-t/d02a0d9368037db46ea3df8e22c6316f87ba2596) is pointing not to exact sync settings but to all gists...?!! Why? if after gist creation it was advised to save that gist and first upload was working fine....?

agne-a-t avatar Aug 26 '17 06:08 agne-a-t

is pointing not to exact sync settings

I think the old gist setting was somehow removed from the code settings depending on which activities on code you performed between first and second upload. and when you hit the uploaded , it created new one, and new one in all computers to sync.

shanalikhan avatar Aug 29 '17 14:08 shanalikhan

I had the same issue as @agne-a-t last discribed. Solved by visiting https://gist.github.com/<your_userName>/<gist_id> Then enter the gist called "cloudSettings" And finally copied the token shown IN THE ADDRESS BAR!!! That is the correct token!

borjao-dev avatar Oct 06 '17 04:10 borjao-dev

@rafaelbdb that worked for me! +1

blubberbo avatar Oct 19 '17 23:10 blubberbo

Hi guys. I encountered recently the same problem and I manage to fixed after all. If you still did not sort it out I recommend you follow these steps:

  1. Make sure your gist is public.
  2. Navigate to View > Command Palette in Visual Studio Code and type sync. Now click on "Sync: Reset Extention Settings".
  3. After that follow again the step 2 and choose "Sync: Download Settings" this time.
  4. Now enter the link for your public gist and it should install your settings.

I hope this is helpful.

bluecondor avatar Oct 31 '17 20:10 bluecondor

The solution @rafaelbdb proposed follows from reading system messages. Gist ID and token are two different character strings; this may seem natural to those better versed in Git, so it's not empathized anywhere, but I assume that's what got @agne-a-t confused initially. You create a GitHub token that is used for upload, but to download settings on another machine you need its corresponding Gist ID; it's reported on successful upload in-app, it literally says «Please copy and use this ID in other machines to download settings» there. Granted, you need both on every machine for 2-way sync.

I've just spent too much time figuring it out, so I'm leaving this here for others who may find themselves in the same situation.

textortexxel avatar Nov 14 '17 06:11 textortexxel

@rafaelbdb that worked for me! +1

ByteRax avatar Nov 16 '17 03:11 ByteRax

I'm always looking to improve the documentation for understanding if its hard for anyone. Send me pull request and i will release it

shanalikhan avatar Nov 16 '17 05:11 shanalikhan

https://github.com/shanalikhan/code-settings-sync/pull/448

shanalikhan avatar Nov 16 '17 14:11 shanalikhan

on every machine you have a "token:" in syncLocalSettings.json and a "sync.gist:" on the local settings (this is the GIST ID). You must share the same valid token-gistID pair everywhere

PabloPap avatar Dec 13 '17 18:12 PabloPap

As suggested in #448, I'd also like to urge @shanalikhan to clarify in README that there are two hash strings (Token and Gist Id) when you use this wonderful extension.

A Token is a hash you get right after fill in a description check the box for gist. A Gist Id is another hash the extension returns you when you upload your setting.

During uploading, you need the Token (and the extension will return you Gist Id). During downloading, you first need the Token and then the Gist Id.

The fact that they both are hash strings confuses the first-time users.

JeremyCCHsu avatar Jan 26 '18 00:01 JeremyCCHsu

@JeremyCCHsu Send me pull request where you think documentation can be improved. I will accept :)

shanalikhan avatar Jan 26 '18 09:01 shanalikhan

@rafaelbdb yes,I also use the gist in atom,so the gist has two files. thank you

yyjazsf avatar Jan 28 '18 01:01 yyjazsf

@JeremyCCHsu Thank you, I've been entering those 2 other way around.

penleychan avatar Feb 15 '18 01:02 penleychan

my gist address is working. but it gives me the error Invalid / Expired GitHub Token, when I run the command sync : Download Settings,.

I solved this problem by these step

  1. copy the value of sync.gist from file settings.json and paste it to target machine.
  2. copy the value of token from file syncLocalSettings.json and paste it to target machine.
  3. run the command sync : Download Settings

Hope that helps!

lizijie avatar May 12 '18 13:05 lizijie