반응형
linux 에서 git 의 private respository 를 clone 하기
기본적으로 public repository 는
git clone https://github.com/yourid/projectname.git
입니다.
private repository 는 아래와 같이 아이디, 비번 정보가 있어야 합니다.
git clone https://yourid:yourpassword@github.com/yourid/projectname.git
물론 본인의 private repository 거나 collaborators 에 포함되어 권한이 있어야겠죠.
linux 권한도 잊지마시고요.
git clone https://yourid:yourpassword@github.com/yourid/projectname.git
fatal: could not create work tree dir 'projectname': Permission denied
# 이건 git 권한이 아닌 linux에 권한이 필요한거
sudo git clone https://yourid:yourpassword@github.com/yourid/projectname.git
혹시나 비밀번호에 특수문자가 있다면, ( urlEncdoe해야할 특수문자들 )
치환해야 합니다. url 과 관련없는 특수문자는 안해도 되더군요.
CharacterPercent-Encoded
| ] | %5B |
| [ | %5D |
| ? | %3F |
| / | %2F |
| < | %3C |
| ~ | %7E |
| # | %23 |
| ` | %6D |
| ! | %21 |
| @ | %40 |
| $ | %24 |
| % | %25 |
| ^ | %5E |
| & | %26 |
| * | %2A |
| ( | %28 |
| ) | %29 |
| + | %2B |
| = | %3D |
| } | %7D |
| | | %7C |
| : | %3A |
| " | %22 |
| ; | %3B |
| ' | %27 |
| , | %2C |
| > | %3E |
| { | %7B |
| space | %20 |
# update
sudo git pull
# branch update
git checkout -f your_branch
# master 는 git checkout -f master
git pull
# force update
$ git reset --hard HEAD
$ git pull
728x90
반응형
'Github' 카테고리의 다른 글
| [Github] Github Desktop 으로 같은 소스 수정했을 때 Merge 하기 (2) | 2020.07.16 |
|---|---|
| [Github] Github Desktop 으로 repository clone 하기 (0) | 2020.07.16 |
| [Github] Github desktop 으로 이미 있는 로컬 폴더 publish 하기 (0) | 2020.07.16 |
| [Github] UI 에 익숙한 사용자를 위한 Github Desktop (0) | 2020.07.16 |
| [Github] markdown Badge, 깃헙 뱃지 버전표시 사용 (0) | 2020.05.13 |
댓글