본문 바로가기
개발/Git

Private Repository 옮기기

by 꾸르배 2021. 7. 5.

Personal Repository에서 작업하고 있던 내용을 Organization Repository로 이동할 일이 생겼다.

더보기

나는 Organization Repository에서 작업하고 있는 줄 알았는데, 알고보니 Personal repo 에서 작업하고 있었다.

팀 멤버와의 소스 공유가 필요없는 저장소라 다행이다.

Organization에 접속한 뒤

Create a Repository를 누르면, Import a repository 라는 버튼이 있다.

 

 

 

파란색 Import a repository

 

 

 

 

Import a repository를 클릭하고, 가져오고 싶은 저장소의 url을 입력하면 된다.

 

하지만 가져오려고 하는 RepositoryPrivate하게 관리가 될 경우엔 다음과 같은 오류가 뜬다.

 

Your old project requires credentials for read-only access. 
We will only temporarily store them for importing.

 

오류와 함께 Login Form 이 뜬다.

하지만 RepositoryOwner 계정으로 로그인을 하여도 정상적으로 clone이 되지 않는다.

(Github의 문제인지, 내가 잘못하고 있는지는 확실 X)

 

아무튼 해결법은 기존의 Repository에서 새로운 Repositorypush 하는 방법으로 해결하였다.

 

git clone "이전 source 주소" (Repository name을 repo라고 가정.)
cd repo
git remote add new-repo "이동할 source 주소"
git push new-repo master

 

That's it.

 

 

참고링크
https://github.community/t/import-repository-not-working/2044

'개발 > Git' 카테고리의 다른 글

README.md  (0) 2021.06.07