Skip to content

Commit

Permalink
GitBook: No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenPearls authored and gitbook-bot committed Aug 28, 2024
1 parent 7e5ba86 commit 48ba30d
Show file tree
Hide file tree
Showing 135 changed files with 153 additions and 111 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@

## ๐Ÿ“” Book

* [๊ทธ๋ฆผ์œผ๋กœ ์‰ฝ๊ฒŒ ์ดํ•ดํ•˜๋Š” ์›น/HTTP/๋„คํŠธ์›Œํฌ](book/http.md)
* [์—๋Ÿฌ๊ฐ€ ๋ฌด์„œ์›Œ์ง€์ง€ ์•Š๋Š” ์ฑ…](book/learn-errors/README.md)
* [1์žฅ ์—๋Ÿฌ๊ฐ€ ์™œ ๋ฌด์„œ์šธ๊นŒ?](book/learn-errors/1.md)
* [2์žฅ ์—๋Ÿฌ๋ฅผ ์ž˜ ์ฝ๋Š” ๋ฐฉ๋ฒ•](book/learn-errors/2.md)
Expand Down
42 changes: 42 additions & 0 deletions developLog/book/http.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
description: cs๋ฅผ ๋ชจ๋ฅด๊ณ  ์ง‘์ค‘๋ ฅ์ด ๋ถ€์กฑํ•œ ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ๋„คํŠธ์›Œํฌ ์ฑ… ์ถ”์ฒœ
icon: book-bookmark
---

# ๊ทธ๋ฆผ์œผ๋กœ ์‰ฝ๊ฒŒ ์ดํ•ดํ•˜๋Š” ์›น/HTTP/๋„คํŠธ์›Œํฌ

ํŠธ์œ„ํ„ฐ์—๋„ ์ ์—ˆ๋Š”๋ฐ ์—„์ฒญ๋‚œ ์กฐํšŒ์ˆ˜?์™€ RT๋ฅผ ํƒ€์„œ VELOG์—๋„ ์†Œ๊ฐœํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„ ์ ์–ด๋ด„

#### ๋•Œ๋Š” 5์›” 4,5,6 ํœด์ผ

์ด๋•Œ.. ๋น„๋„ ์˜ค๊ณ  ๊ทธ๋ƒฅ ์ง‘์—์„œ ๋ญ”๊ฐ€ ์ฑ…์„ ํ•œ ๊ถŒ์„ ์ฝ์–ด์•ผ ๊ฒ ๋‹ค ์‹ถ์—ˆ๋Š”๋ฐ.. ์†”์งํžˆ ํŽ˜์ด์ง€ ์ˆ˜ ๋งŽ์€ ์ฑ…์€ ์ฝ๊ธฐ๋„ ์‹ซ๊ณ ..ํ•ด์„œ ๊ฐ€๋ฒผ์šด ๊ฒƒ์„ ์ฝ๊ณ  ์‹ถ์—ˆ์Œ

์š”์ฆ˜ ๋„คํŠธ์›Œํฌ ์›๋ฆฌ ์ฑ…์— ๋Œ€ํ•ด์„œ ์ฝ๊ณ  ์žˆ๋Š” ๋ฐ ์ปคํ”ผ์ฑ—์—์„œ ๋น„์Šทํ•œ ์ข…๋ฅ˜์˜ ์ฑ…์„ 3๊ถŒ์”ฉ์€ ์ฝ์–ด๋ด์•ผ ํ•œ๋‹ค ํ•ด์„œ ๋„คํŠธ์›Œํฌ ์ฑ… 2๊ถŒ ์ •๋„ ๋” ์‚ฌ๋ ค๋‹ค๊ฐ€ ํœด์ผ์— ์ฝ๊ธฐ ์ข‹์€ ์ฑ…์ธ ๊ฒƒ ๊ฐ™์•„ ๊ตฌ๋งคํ–ˆ๋‹ค.

#### ํŠธ์œ„ํ„ฐ์— ๊ณต์œ ํ–ˆ๋Š”๋ฐ

![](https://velog.velcdn.com/images/prettylee620/post/7fad656a-ca3d-4c53-9479-b70b639f1111/image.png)

์กฐํšŒ์ˆ˜๋„ ๋‚˜๋ฆ„ ์ž˜ ๋‚˜์˜ค๊ณ  ํ•ด์„œ ๋‚ด VELOG์— ๋“ค์–ด์˜ค์‹œ๋Š” ๋ถ„๋“ค์€ ๋ณดํ†ต ์‹ ์ž… OR ์ทจ์ค€์ƒ์ผ ํ…Œ๋‹ˆ ๋ญ”๊ฐ€ ๊ณต์œ ํ•ด๋ณด๊ณ  ์‹ถ์—ˆ์Œ

#### ๊ทธ๋ฆผ์œผ๋กœ ์ฐฐ๋–ก ๋น„์œ 

![](https://velog.velcdn.com/images/prettylee620/post/0faeb4ec-7e3b-4913-ad6a-6947a37b06b6/image.png) ![](https://velog.velcdn.com/images/prettylee620/post/3718acdc-49cc-4cdc-a798-907f6a896824/image.png)

๊ทธ๋ฆผ์œผ๋กœ ์ฐฐ๋–ก ๋น„์œ  ํ•ด๋†“์•„์„œ ๊ฐ€๋ณ๊ฒŒ ์ฝ์–ด๋„ ๊ธฐ์–ต์— ์˜ค๋ž˜๋‚จ์Œ

#### ๊ฐ€๋ณ๊ฒŒ ์ฝ์„ ์ˆ˜ ์žˆ์ง€๋งŒ ์ž˜ ๋‚˜์™€ ์žˆ๋Š” ์„ค๋ช…

![](https://velog.velcdn.com/images/prettylee620/post/a6ca8df9-55f1-4241-ba70-992e101abd17/image.png)

์•Œ๋ผ๋”˜ ์†Œ๊ฐœ ๊ธ€์—๋„ ๋‚˜์™€ ์žˆ๋Š”๋ฐ 260์ •๋„ ๋˜๋Š” ์ฑ…์ด๋ผ ํ•ด์„œ ๋ง‰ ์งง์€ ๋Š๋‚Œ์œผ๋กœ OSI ๊ณ„์ธต ์†Œ๊ฐœ \~ ์ด๋Ÿฌ๋‹ค ๋๋‚˜๋Š” ๊ฑฐ ์•„๋‹˜

* ์›น์ด๋ž‘ ์ธํ„ฐ๋„ท์˜ ์ฐจ์ด
* HTTP์˜ 1.0, 1.1, 2, 3์ด ๋‚˜์˜ค๊ฒŒ ๋œ ๊ณ„๊ธฐ์™€ ์–ด๋–ค ์ ์ด ๋‹ค๋ฅธ ์ง€, ์ง€๊ธˆ ํ‘œ์ค€์œผ๋กœ ์“ฐ๊ณ  ์žˆ๋Š” HTTP๊ฐ€ ๋ฌด์—‡์ธ์ง€
* SSL/TLS์˜ ์ฐจ์ด์™€ SSL์˜ ๋™์ž‘ ๋ฐฉ์‹
* TCP ์—ฐ๊ฒฐ ๋ฐฉ์‹ 3 hand-shake 4 hand-shake
* ์•”ํ˜ธํ™” ๋ฐฉ์‹

์—„์ฒญ deepํ•˜๊ฒŒ ๋“ค์–ด๊ฐ„๋‹ค๊ณ  ํ•  ์ˆ˜๋Š” ์—†์ง€๋งŒ ๋„คํŠธ์›Œํฌ ๊ณต๋ถ€๋Š” ํ•ด์•ผํ•˜๋Š”๋ฐ \~ ๊ฐ•์˜๋Š” ๋“ฃ๊ธฐ ์‹ซ๊ณ  ๋‹ค๋ฅธ ์ฑ…์€ ๋„ˆ๋ฌด ๋‘๊ป๊ณ  ๋ถ€๋‹ด์ด ๋œ๋‹ค๋ฉด ์ฝ๊ธฐ ์ข‹๋‹ค!!!

๊ฐ•์ถ”
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
icon: triangle-exclamation
description: ์—๋Ÿฌ๊ฐ€ ๋ฌด์„œ์›Œ์ง€์ง€ ์•Š๋Š” ์ฑ…
icon: triangle-exclamation
---

# ์—๋Ÿฌ๊ฐ€ ๋ฌด์„œ์›Œ์ง€์ง€ ์•Š๋Š” ์ฑ…

<figure><img src="../../.gitbook/assets/image (38).png" alt=""><figcaption></figcaption></figure>
26 changes: 26 additions & 0 deletions developLog/ci-cd/github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
description: github ๊ด€๋ จ
icon: github
cover: >-
../../.gitbook/assets/DALLยทE 2024-08-12 14.45.06 - A cute, horizontal banner
designed for a GitHub page. The banner features the GitHub logo (Octocat) in a
playful and adorable style, with elements lik.webp
coverY: -64
layout:
cover:
visible: true
size: hero
title:
visible: true
description:
visible: true
tableOfContents:
visible: true
outline:
visible: true
pagination:
visible: false
---

# github

This file was deleted.

94 changes: 83 additions & 11 deletions developLog/ci-cd/github/github.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
---
description: github ๊ด€๋ จ
icon: github
cover: >-
../../.gitbook/assets/DALLยทE 2024-08-12 14.45.06 - A cute, horizontal banner
designed for a GitHub page. The banner features the GitHub logo (Octocat) in a
playful and adorable style, with elements lik.webp
coverY: -64
icon: git
description: github ์ž์ฃผ ์“ฐ๋Š” ๋ช…๋ น์–ด ๋ชจ์•„๋ณด๊ธฐ
layout:
cover:
visible: true
size: hero
title:
visible: true
description:
Expand All @@ -22,5 +14,85 @@ layout:
visible: false
---

# github
# github ์ž์ฃผ ์“ฐ๋Š” ๋ช…๋ น์–ด

## 1. ๋กœ์ปฌ ์ €์žฅ์†Œ์™€ ์›๊ฒฉ ์ €์žฅ์†Œ ๋งž์ถ”๊ธฐ

> `git reset --hard` ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ ธ์„ ๋•Œ, ๋กœ์ปฌ ์ €์žฅ์†Œ๋Š” ๊ทธ ์ปค๋ฐ‹ ์ดํ›„์˜ ๋ชจ๋“  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์žƒ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์ด๋•Œ ๋กœ์ปฌ ์ €์žฅ์†Œ์™€ ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ์ƒํƒœ๊ฐ€ ๋ถˆ์ผ์น˜ํ•˜๊ฒŒ ๋˜๋ฉฐ, ์ด๋ฅผ ๋งž์ถ”๊ธฐ ์œ„ํ•ด ๊ฐ•์ œ๋กœ ํ‘ธ์‹œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
1. **`git reset --hard` ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ฆผ**

์ด๋ฏธ ์‹คํ–‰ํ•œ ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค:

```bash
git reset --hard 6bec4114ed3cfd83858aa59311ca0ac9813d6c18
```

์ด ๋ช…๋ น์–ด๋Š” ๋กœ์ปฌ ์ €์žฅ์†Œ๋ฅผ `6bec4114ed3cfd83858aa59311ca0ac9813d6c18` ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ฆฝ๋‹ˆ๋‹ค.
2. **์›๊ฒฉ ์ €์žฅ์†Œ์— ๊ฐ•์ œ๋กœ ํ‘ธ์‹œ**

๋กœ์ปฌ ์ €์žฅ์†Œ๋ฅผ ์›๊ฒฉ ์ €์žฅ์†Œ์™€ ๋งž์ถ”๊ธฐ ์œ„ํ•ด ๊ฐ•์ œ๋กœ ํ‘ธ์‹œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ๋ฎ์–ด์“ฐ๋Š” ๊ฒƒ์ด๋ฏ€๋กœ ์ฃผ์˜๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

```bash
git push origin main --force
```

์—ฌ๊ธฐ์„œ `main`์€ ํ˜„์žฌ ์‚ฌ์šฉ ์ค‘์ธ ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. ๋งŒ์•ฝ ๋‹ค๋ฅธ ๋ธŒ๋žœ์น˜๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋ผ๋ฉด ํ•ด๋‹น ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์„ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

### ์ฃผ์˜์‚ฌํ•ญ

* **๊ฐ•์ œ ํ‘ธ์‹œ (`--force`)**: ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ํžˆ์Šคํ† ๋ฆฌ๊ฐ€ ๋ฎ์–ด์จ์ง€๊ธฐ ๋•Œ๋ฌธ์—, ์ด ์ž‘์—…์€ ์‹ ์ค‘ํ•˜๊ฒŒ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํŠนํžˆ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์ด ์ด ์ €์žฅ์†Œ๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋ผ๋ฉด, ๊ทธ๋“ค์—๊ฒŒ ์˜ํ–ฅ์„ ๋ฏธ์น  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
* **ํžˆ์Šคํ† ๋ฆฌ ์†์‹ค**: ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ฉด ๋˜๋Œ๋ฆฐ ์ดํ›„์˜ ๋ชจ๋“  ์ปค๋ฐ‹์ด ํžˆ์Šคํ† ๋ฆฌ์—์„œ ์‚ฌ๋ผ์ง€๋ฏ€๋กœ, ํ•„์š”ํ•  ๊ฒฝ์šฐ ๋ฐฑ์—…์„ ๊ณ ๋ คํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

### ์ „์ฒด์ ์ธ ์ ˆ์ฐจ ์š”์•ฝ

1. **๋กœ์ปฌ ์ปค๋ฐ‹ ๋˜๋Œ๋ฆฌ๊ธฐ**: `git reset --hard <commit-hash>`
2. **์›๊ฒฉ ์ €์žฅ์†Œ์— ๊ฐ•์ œ ํ‘ธ์‹œ**: `git push origin <branch-name> --force`

์ด ์ž‘์—…์„ ํ†ตํ•ด ๋กœ์ปฌ๊ณผ ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ์ƒํƒœ๋ฅผ ์ผ์น˜์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.



## 2. Forkํ•œ ๋ ˆํฌ์ง€ํ† ๋ฆฌ commit ๊ธฐ๋ก ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•œ ์ž‘์—…

> ์ฐธ๊ณ  : [https://soranhan.tistory.com/11](https://soranhan.tistory.com/11)

1. **์ผ๋‹จ ๋‚ด github์— ์ƒˆ๋กœ์šด ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋ฅผ ๋งŒ๋“ ๋‹ค.**
2. **terminal์„ ์—ฐ๋‹ค.**
3. **๋ณต์‚ฌํ•˜๊ณ ์ž ํ•˜๋Š” repository๋ฅผ bare cloneํ•œ๋‹ค.**

```
$ git clone --bare https://github.com/exampleuser/old-repository.git
```
4. **์ƒˆ๋กœ์šด ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋กœ Mirror-push**
```
$ cd old-repository.git
$ git push --mirror https://github.com/exampleuser/new-repository.git
```
5. **์ฒ˜์Œ์— ์ž„์‹œ๋กœ ์ƒ์„ฑํ–ˆ๋˜ local repository๋ฅผ ์‚ญ์ œ**
```
$ cd ..
$ rm -rf old-repository.git
```
6. ๋‹ค๋งŒ ์ด๊ฒŒ ๊ฐ€๋” ์•ˆ๋˜๋Š” ๊ฒŒ ์žˆ๋Š”๋ฐ ๊ทธ ์ด์œ ๋Š” `๊ถŒํ•œ` ๋•Œ๋ฌธ์ด๊ธฐ์— ํ† ํฐ์„ ๋งŒ๋“ค์–ด์ฃผ๊ณ  ๊ทธ๊ฑธ๋กœ ์‚ฌ์šฉํ•ด์•ผ ํ•จ
> GitHub Personal Access Token ์ƒ์„ฑ
>
> 1. GitHub ๊ณ„์ •์œผ๋กœ ๋กœ๊ทธ์ธํ•ฉ๋‹ˆ๋‹ค.
> 2. [GitHub์˜ Personal Access Token ์ƒ์„ฑ ํŽ˜์ด์ง€](https://github.com/settings/tokens)๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
> 3. "Generate new token" ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
> 4. **๊ถŒํ•œ(Scopes)**์—์„œ `repo`, `workflow`, `admin:repo_hook` ๊ถŒํ•œ์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ์ด ํ† ํฐ์€ ์ €์žฅ์†Œ์— ๋Œ€ํ•œ ์ฝ๊ธฐ/์“ฐ๊ธฐ ๊ถŒํ•œ์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.
> 5. ์ƒ์„ฑ๋œ ํ† ํฐ์„ ๋ณต์‚ฌํ•ด๋‘ก๋‹ˆ๋‹ค. ์ด ํ† ํฐ์€ ๋‚˜์ค‘์— ์‚ฌ์šฉํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.
> 6. ๊ฐœ์ธ์ž˜ํŽ˜์ด์ง€์— ํ† ํฐ๊ธฐ๋กํ•ด๋‘๊ธฐ!!!
* Personal Access Token (PAT) ์‚ฌ์šฉ : `git push --mirror` ๋ช…๋ น์–ด์— Personal Access Token์„ ํฌํ•จํ•˜์—ฌ ์ธ์ฆ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
```
git push --mirror https://<TOKEN>@github.com/exampleuser/new-repository.git
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 48ba30d

Please sign in to comment.