brunch

매거진 kakao cloud

You can make anything
by writing

C.S.Lewis

by Master Seo Feb 14. 2024

카카오 클라우드 4탄-17. git 시작하기

git사용법을 알아보자~


<1> 명령서버로 사용할 로키 리눅스 1대 생성

<2> Github가입하기

<3> Git에 올라간것 확인



<1> 명령서버로 사용할 로키 리눅스 1대 생성


https://kakaocloud.com/


로키 리눅스 1대 생성

공인 IP 연결하기

서버 로그인 하기

git 설치하기




yum install git -y


git version

git version 2.39.3




<2> GitHub 가입하기



1

https://github.com/


레파지토리 1개 만들어 테스트해보자.


test1




2

public으로 만들자.



3

git config  --global user.name "topasvga2"

git config --global user.email "topasvga@kakao.com"






4

GitHub 사이트 로그인 하자


인증 방식이 ID / Passwd 에서 토큰  방식으로 변경 되었다.

토큰을 만들어 사용하자.




만들어진 토큰 복사해두기




5

리눅스 서버에서  깃허브에 올리기


create a new repository on the command line



echo "# test1" >> README.md

git init

git add README.md

git commit -m "first commit"

git branch -M main

git remote add origin https://github.com/topasvga2/test1.git

git push -u origin main



user는 topasvga2

암호는 토큰  (위의 토큰 참조)



<3> Git에 올라간것 확인





추가 테스ㅌ


echo "# test3" >> README.md

git init

git add README.md

git commit -m " 3 commit"

git branch -M main

git remote add origin https://github.com/topasvga2/test1.git

git push -u origin main


topasvga2

ghp_gkQVDGaAHTjTxxxxxxxxxxxxxxxxxxxxxxxxx



참고

# 원격 오리진 삭제

git remote rm origin


# 원격 오리진 확인

git remote -v






깃허브는 2차 인증 하라!!!



명령어 참고


https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories




몰아보기

https://brunch.co.kr/@topasvga/1821



카카오 클라우드 CI/CD 사용해 보기

https://brunch.co.kr/@topasvga/3668



https://brunch.co.kr/@topasvga/3651



감사합니다.


                    

매거진의 이전글 카카오클라우드 4탄-16.CI/CD

작품 선택

키워드 선택 0 / 3 0

댓글여부

afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari