๐ETC.
[Github] Git branch ๊ด๋ฆฌ
#๋ธ๋ ์น ๋ชฉ๋ก git branch #๋ธ๋ ์น ์ ์ฒด ๋ชฉ๋ก git branch -a #๋ธ๋ ์น ์์ฑ/์ด๋ git checkout -b {๋ธ๋ ์น ์ด๋ฆ} #master๋ก ๋์์ด git checkout master ์๋ก ์์ฑํ ๋ธ๋ ์น๊ฐ ๋ชฉ๋ก์ ์ ๋ณด์ผ๋ #์ ๋ฐ์ดํธ git remote update #๋ค์ ๋ชฉ๋ก ๋ณด๊ธฐ git branch -a ์ญ์ ํ ์๊ฒฉ ๋ธ๋ ์น๊ฐ ๋ชฉ๋ก์ ๋ ธ์ถ๋ ๋ #์๊ฒฉ ์ ์ฅ์์ ์ญ์ ํ ๋ธ๋ ์น ์ ๋ฆฌ git fetch --all --prune ๋ก์ปฌ ๋ธ๋ ์น ์ ๋ฆฌํ ๋ #๋ก์ปฌ ๋ธ๋ ์น ๋ชจ๋ ์ญ์ git branch | grep -v '^*' | xargs git branch -d
[GitHub] ๋งฅ๋ถ์์ ๊นํ๋ธ์ ํ๋ก์ ํธ ์ฌ๋ฆฌ๊ธฐ
1. ํฐ๋ฏธ๋์์ ์ ๋ก๋ํ ํ๋ก์ ํธ๋ก ๊ฒฝ๋ก ๋ณ๊ฒฝ 2. ๊นํ๋ธ ํ์ผ ์์ฑํ๊ธฐ git init 3. ํ์ฌ ํ์ผ ์ ์ฅ git add . git commit -m "์ปค๋ฐ ๋ฉ์ธ์ง" 4. GitHub์์ ๋ ํฌ์งํ ๋ฆฌ ์์ฑ 5. 4์์ ์์ฑํ ๋ ํฌ์งํ ๋ฆฌ๋ก ์ฐ๊ฒฐ git remote add origin {4์์ ์์ฑํ ๋ ํฌ์งํ ๋ฆฌ ์ฃผ์} 6. ์ฐ๊ฒฐ๋ ๋ ํฌ์งํ ๋ฆฌ ํ์ธ git remote -v 7. ์ฐ๊ฒฐ๋ ๋ ํฌ์งํ ๋ฆฌ์ ํธ์ git push
[Github] git@github.com: Permission denied (publickey). ์๋ฌ ํด๊ฒฐ
git push ๋๋ git pull ํ ๋ ๋ฐ์ํ๋ ์๋ฌ git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ์๋ก ssh key๋ฅผ ๋ง๋ค์ด์ค์ผ ํจ. ssh key ์์ฑ ssh-keygen -t rsa -C "{๋ณธ์ธ์ ๊นํ๋ธ ์ด๋ฉ์ผ}" ์ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ๋ฉด ๋จ. 1. ssh key ์ ์ฅ ์์น ์ง์ (์ํฐํ๋ฉด ๊ธฐ๋ณธ ์ง์ ๋ ์์น์ ์ ์ฅ) 2. ๋น๋ฐ๋ฒํธ ์ง์ (์ํฐํด์ ๋๊ธฐ๊ธฐ ๊ฐ๋ฅ) sshํค ํ์ธํ๊ธฐ cat ~/.ssh/id_rsa.pub ์ ๋ช ๋ น์ด๋ก ๋์จ ํค..
[Github] ๊น(git) ์ฌ์ฉํ๊ธฐ
์ํ #๊น ์ํ ํ์ธ git status ํด๋ก (clone) #๊ธฐ๋ณธ master ๋ธ๋ ์น ํด๋ก git clone {git ์ ์ฅ์ URL} {์์ฑํ ํด๋๋ช } #ํน์ ๋ธ๋ ์น ํด๋ก git clone -b {branch_name} --single-branch {git ์ ์ฅ์ URL} {์์ฑํ ํด๋๋ช } - {์์ฑํ ํด๋๋ช }์ ์ ์ง์์ผ๋ฉด git์ผ๋ก ๋ถ๋ฌ์ค๋ repository์ ์ด๋ฆ์ผ๋ก ์์ฑ๋จ ์ปค๋ฐ (commit) git commit -m "์ปค๋ฐ ๋ฉ๋ชจ" ํธ์ (push) #master ๋ธ๋ ์น์ push git push origin master #ํน์ ๋ธ๋ ์น์ push git push origin {๋ธ๋ ์น ์ด๋ฆ} ํ (pull) #์ฌ์ฉํ๊ณ ์๋ ๋ธ๋ ์น pull git pull #ํน์ ๋ธ๋ ์น pull git pull o..
[API] ๊ตฌ๊ธ์บ๋ฆฐ๋API(2) - ์ด๋ฒคํธ ์ถ๊ฐ (ํฌ์คํธ๋งจ ์ฌ์ฉ)
๊ตฌ๊ธ OAuth๋ฅผ ์ฌ์ฉํ๋ค. https://soda-dev.tistory.com/60 [API] ๊ตฌ๊ธ OAuth๋ก ํ ํฐ(access token) ๋ฐ๊ธ๋ฐ๊ธฐ ๊ตฌ๊ธ ํด๋ผ์ฐ๋ ํ๋ซํผ์ ์ฌ์ฉํ์ฌ ์ฐ๋ํ๋ค. OAuthํ ํฐ ์ฌ์ฉ ํฌ์คํธ๋งจ (Postman) ์ฌ์ฉ ๊ตฌ๊ธ ํด๋ผ์ฐ๋ ํ๋ซํผ https://console.cloud.google.com/ Google Cloud Platform ํ๋์ ๊ณ์ ์ผ๋ก ๋ชจ๋ Google ์๋น์ค๋ฅผ Go.. soda-dev.tistory.com ํฌ์คํธ๋งจ @Authorization ํค๋์ Barrer Token์ ์ ํํ๊ณ access_token ๋ฃ๊ธฐ https://www.googleapis.com/calendar/v3/calendars/{calendar_id}/events {calendar_id..
[API] ๊ตฌ๊ธ์บ๋ฆฐ๋ API (1) - ์บ๋ฆฐ๋ list ํธ์ถ
๊ตฌ๊ธ OAuth๋ฅผ ์ฌ์ฉํ๋ค. https://soda-dev.tistory.com/60 [API] ๊ตฌ๊ธ OAuth๋ก ํ ํฐ(access token) ๋ฐ๊ธ๋ฐ๊ธฐ ๊ตฌ๊ธ ํด๋ผ์ฐ๋ ํ๋ซํผ์ ์ฌ์ฉํ์ฌ ์ฐ๋ํ๋ค. OAuthํ ํฐ ์ฌ์ฉ ํฌ์คํธ๋งจ (Postman) ์ฌ์ฉ ๊ตฌ๊ธ ํด๋ผ์ฐ๋ ํ๋ซํผ https://console.cloud.google.com/ Google Cloud Platform ํ๋์ ๊ณ์ ์ผ๋ก ๋ชจ๋ Google ์๋น์ค๋ฅผ Go.. soda-dev.tistory.com https://console.cloud.google.com/home/ Google Cloud Platform ํ๋์ ๊ณ์ ์ผ๋ก ๋ชจ๋ Google ์๋น์ค๋ฅผ Google Cloud Platform์ ์ฌ์ฉํ๋ ค๋ฉด ๋ก๊ทธ์ธํ์ธ์. accounts.google.com..
[API] ๊ตฌ๊ธ ์์ธ์คํ ํฐ(access token) ์ฌ๋ฐ๊ธ ๋ฐ๊ธฐ
Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. ์์ฒญ์ ์๋ชป๋ ์ธ์ฆ ์๊ฒฉ ์ฆ๋ช ์ด ์์ต๋๋ค. OAuth 2 ์ก์ธ์ค ํ ํฐ, ๋ก๊ทธ์ธ ์ฟ ํค ๋๋ ๊ธฐํ ์ ํจํ ์ธ์ฆ ์๊ฒฉ ์ฆ๋ช ์ด ํ์ํฉ๋๋ค. https://developers.google.com/identity/sign-in/web/devconsole-project๋ฅผ ์ฐธ์กฐํ์ธ์. ๊ตฌ๊ธ ์์ธ์คํ ํฐ(access token)์ ๊ณ์ ์ฌ์ฉํ ์ ์๋ ๊ฒ์ด..
[API] ๊ตฌ๊ธ OAuth๋ก ํ ํฐ(access token) ๋ฐ๊ธ๋ฐ๊ธฐ
๊ตฌ๊ธ ํด๋ผ์ฐ๋ ํ๋ซํผ์ ์ฌ์ฉํ์ฌ ์ฐ๋ํ๋ค. OAuthํ ํฐ ์ฌ์ฉ ํฌ์คํธ๋งจ (Postman) ์ฌ์ฉ ๊ตฌ๊ธ ํด๋ผ์ฐ๋ ํ๋ซํผ https://console.cloud.google.com/ Google Cloud Platform ํ๋์ ๊ณ์ ์ผ๋ก ๋ชจ๋ Google ์๋น์ค๋ฅผ Google Cloud Platform์ ์ฌ์ฉํ๋ ค๋ฉด ๋ก๊ทธ์ธํ์ธ์. accounts.google.com ํ๋ก์ ํธ ๋ง๋ค๊ธฐ -> ํ๋ก์ ํธ๋ช ์ ์ ํ๊ณ ์์ฑ OAuth ๋์ ํ๋ฉด ๊ตฌ์ฑํ๊ธฐ - ์ฌ๊ธฐ์ ๋ฑ๋กํ์ง ์์ผ๋ฉด ์ฌ์ฉ ๋ชปํจ - ๋ฑ๋กํ์ง ์๊ณ ๋ ์ฌ์ฉํ๊ธฐ ์ํด์๋ ๊ณต์๋ฐฐํฌ๋ฅผ ํด์ผํจ OAuth ํด๋ผ์ด์ธํธ ID ๋ง๋ค๊ธฐ ๋์ํ๋ฉด์ ๋ค ๊ตฌ์ฑํ์ฌ ์์ฑํ์๋ค๋ฉด ๋งํฌ https://accounts.google.com/o/oauth2/v2/auth? scope=https%3..
[API] Slack ์ฌ๋ API ์ฐ๋ -OAuth
https://api.slack.com/ Slack์ ๋ฏธ๋์ ์ ๋ฌด๊ฐ ์ด๋ฃจ์ด์ง๋ ๊ณณ์ ๋๋ค Slack์ ์ฌ๋ฌ๋ถ์ ํ๊ณผ ์ํตํ ์๋ก์ด ๋ฐฉ๋ฒ์ ๋๋ค. ์ด๋ฉ์ผ๋ณด๋ค ๋น ๋ฅด๊ณ , ๋ ์กฐ์ง์ ์ด๋ฉฐ, ํจ์ฌ ์์ ํฉ๋๋ค. slack.com ์ฑ ์์ฑํ๊ธฐ - ์ํฌ์คํ์ด์ค๋ฅผ ์์ฑํ๊ณ ๋ค์ ๋์์ค๊ธฐ ๋ด ์์ฑํ๊ธฐ - ๋ฒ์ ์ ํ๊ธฐ : ์นํ ๋งํฌ๋ง ์ป์๊ฑฐ๋ผ๋ฉด ๋ฒ์๋ incoming-webhook ์ฌ๊ธฐ๊น์ง ํ๋ฉด Bot User OAuth Token์ ์ป์์ ์๋ค. OAuth ์ธ์ฆ https://slack.com/oauth?client_id={ํด๋ผ์ด์ธํธ ์์ด๋}&scope=incoming-webhook&tracked=1 ํด๋ผ์ด์ธํธ ์์ด๋ = Basic Information์ ์์ ์ url๋ก ์ด๋ redirecURL์ ์ ์ ๊ณณ์ผ๋ก ์ด๋๋๋ฉฐ url์..