it/it service
옵시디언(Obsidian) git 연결
CheeseChaos
2023. 9. 14. 16:02
Obsidian과 git을 연동해 백업하기
obsidian git을 설치하고 git desktop 프로그램도 설치해 연결했지만 자동으로 push가 되지 않아 방법을 찾아보던 중 개인 토큰을 발급받아 사용하는 방법이 있어 사용했습니다.
개인토큰으로 url을 변경해주면 ssh나 다른 인증을 방식을 쓰지 않고 사용할 수 있습니다.
git repository 생성
Obsidian git 설치
토큰 키로 remote url 변경
- 변경할 url 양식
https://forum.obsidian.md/t/the-easiest-way-to-setup-obsidian-git-to-backup-notes/51429https://<PERSONAL_ACCESS_TOKEN>@github.com/<USERNAME>/<REPO>.git
- 변경할 url 양식
변경 방법
Open Terminal.
Change the current working directory to your local project.
List your existing remotes in order to get the name of the remote you want to change.
$ git remote -v > origin https://github.com/OWNER/REPOSITORY.git (fetch) > origin https://github.com/OWNER/REPOSITORY.git (push)
Change your remote's URL from HTTPS to SSH with the
git remote set-url
command.git remote set-url origin https://<PERSONAL_ACCESS_TOKEN>@github.com/<USERNAME>/<REPO>.git
Verify that the remote URL has changed.
$ git remote -v # Verify new remote URL > origin https://<PERSONAL_ACCESS_TOKEN>@github.com/<USERNAME>/<REPO>.git (fetch) > origin https://<PERSONAL_ACCESS_TOKEN>@github.com/<USERNAME>/<REPO>.git (push)