오류확인.해결

intellij에서 gitlab repository push 오류

emilyyoo 2024. 4. 20. 10:14
728x90

 

상황 : intellij 에서 gitlab에서 최초로 project를 add할 경우, push가 안됨.

gitlab에서 빈프로젝트를 만들고 그 repository주소로 push 하면 될 것 같았지만

intellij에서 바로 하고 싶었다. 

 

오류메시지 :

{project-name} does not appear to be a git repository

Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

 

원인: 

intellij 에서 push할때 'define repository' 하면 gitlab에서 repository 자동으로 만들어지는 줄 알았는데 아니었다. 

물론 방법이 분명있을 것이다. intellij 와 gitlab, local pc 간에 권한 문제일 것이지만 

같은 질문을 한 사용자에게 gitlab개발자는 아래와 같은 답변을 했다. 

 

 

 

 

->그냥 Gitlab.com 웹사이트에서 빈 프로젝트 만들고 그 주소로 push하라고.

 

 

해결 : 

그렇게 하기 싫어서 그런건데... 어쨌든 그렇게 하니 잘 된다. 

웹사이트에서 빈 프로젝트 만듦.

 

 

위처럼 빈프로젝트를 만들고

 

intellij에 git > push > 'define repository' 할 때

https://gitlab.com/{gitlab id}/{사이트에서 만든 빈 프로젝트 이름}.git

 

 

 

728x90