본문 바로가기

ops/github3

로컬 리포지토리에서 ssh 설정하기 ssh 설정은 되어 있지만 remote repository로 push가 되지 않는다. github에서 username, password로의 접속을 허용하지 않으므로 ssh로 push를 할수 있도록 설정 1.사전 설정 SSH and GPG keys 메뉴에서 ssh public key를 먼저 등록해 주어야 한다. #ssh 연결이 되는지 확인 ssh -T git@github.comHi seohan1010! You've successfully authenticated, but GitHub does not provide shell access.연결 테스트 2. remote 주소를 로컬 리포지터리에 등록 ssh의 주소 복사 #로컬 리포지터리에 등록 git remote add origin git@github... 2026. 2. 6.
[github] 로컬 리포지터리를 github에 푸쉬하기 https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github Adding locally hosted code to GitHub - GitHub DocsIf your code is stored locally on your computer and is tracked by Git or not tracked by any version control system (VCS), you can import the code to GitHub using GitHub CLI or Git commands.docs.github.com 2024. 10. 7.
[github] 생성된 로컬 리포지터리를 github에 올리기 로컬 디렉터리가 아직 깃 리포지터리가 아닐때  git initgit add README.mdgit commit -m "first commit"git branch -M maingit remote add origin 깃허브 리포지터리 주소git push -u origin main  로컬 디렉터리가깃 리포지터리 일때 git remote add origin 깃허브 리포지터리 주소git branch -M maingit push -u origin main 2024. 7. 3.