1. Extension에서 Settings Sync 를 인스톨한다.
Settings Sync를 시작하려면 아래 두 가지가 필요하다.
- GitHub Token
- GitHub Gist Id
2. Github Token 발급 방법
- Github 로그인 후, Settings > Developeer settings > Personal access tokens 로 이동
- Generate new token 클릭
3. 토큰 생성 화면으로 이동한 뒤, gist 를 선택하고 토큰 발급 버튼을 누른다.
4. 발급한 토큰은 복사해두자.
3. Github Gist Id 발급 방법
- gist.github.com 에 접속한 뒤, 로그인한다.
- cloudSettings 로 secret gist를 발행한다.
3. 발행한 secret를 클릭한 뒤, 주소창 uri에서 gist id를 찾아서 복사해두자.
https://gist.github.com/{your github id}/{your gist id}
4. VS Code에서 Settings.json 수정
- Settings.json 에 아래 설정을 추가한다. 3번에서 발급받은 gist id를 넣는다.
"sync.gist": "your gist id",
"sync.autoDownload": false,
"sync.autoUpload": false,
"sync.forceDownload": false,
"sync.forceUpload": false,
"sync.quietSync": false,
"sync.removeExtensions": true,
"sync.syncExtensions": true
5. VS Code에서 syncLocalSettings.json 수정
1. syncLocalSettings.json 에 아래 설정을 추가한다. 2번에서 발급받은 github token을 넣는다.
{
"ignoreUploadFiles": [
"state.*",
"syncLocalSettings.json",
".DS_Store",
"sync.lock",
"projects.json",
"projects_cache_vscode.json",
"projects_cache_git.json",
"projects_cache_svn.json",
"gpm_projects.json",
"gpm-recentItems.json"
],
"ignoreUploadFolders": [
"workspaceStorage"
],
"ignoreExtensions": [],
"gistDescription": "Visual Studio Code Settings Sync Gist",
"version": 340,
"token": "YOUR_GITHUB_TOKEN",
"downloadPublicGist": false,
"supportedFileExtensions": [ "json", "code-snippets" ],
"openTokenLink": true,
"disableUpdateMessage": false,
"lastUpload": null,
"lastDownload": null,
"githubEnterpriseUrl": null,
"askGistDescription": false,
"customFiles": {},
"hostName": null,
"universalKeybindings": false,
"autoUploadDelay": 20
}
6. 세팅 정보 업로드
1. 단축키를 눌러서 세팅한 값을 업로드하면, gist의 cloudSettings가 업데이트 된다.
Press Shift + Alt + U (macOS: Shift + Option + U)
2. 업로드 시도 후, syncLocalSettings.json 를 읽을 수 없다는 오류가 발생하면, syncLocalSettings.json 파일을 삭제 후 재성성해보자.
- 파일 위치
- 윈도우 : %APPDATA%\Code\User
- 맥 : $HOME/Library/Application Support/Code/User
'Programming > 쓸모있는 정보들' 카테고리의 다른 글
VSCode 플러그인 추천 (0) | 2021.05.08 |
---|---|
맥에서 Mac Address 확인하기 (0) | 2021.05.07 |
맥, 윈도우에서 브라우저 스크롤 캡쳐하는 방법 (0) | 2021.04.26 |
homebrew 삭제 방법 (0) | 2021.04.25 |
데이터 시각화란? (0) | 2021.04.14 |