티스토리 뷰

반응형

Permission to gitAddress.git denied to 'User'.

 

기존에 존재하고 있던 Git Repository 에서 새로운 Repository 로 옮길 시 다음과 같은 이슈가 발생합니다.

 

따라서 변경해야할 몇 가지 부분이 있습니다..반영할 프로젝트 폴더로 이동 후 

Git 초기화 및 '사용자 이름'과 '이메일'을 설정 합니다.

 

$ git rm *

$ git init

 

$ git config --global user.name "Dev Faith"

$ git config --global user.email ExampleFD@example.com

 

두번째로 remote을 현재 변경할 Git <ID/Password>로 등록 합니다. 

<GitID> : Git ID

<Git비밀번호> : Git 비번

<git주소>.git : Repository 변경한 이름

 

$ git remote set-url origin https://<GitID>:<Git비밀번호>@github.com/<git주소>.git

  ('<','>' 은 포함하지 않습니다.)

 

ex) 

$ git remote set-url origin https://example_id:password@github.com/example.git

 

반응형

 

정리

1. 기존 Git 제거 및 초기화

2. Git <사용자 이름>, <이메일> 설정

3. Remote Git ID/Password 등록

 

그럼 정상적으로 동작합니다.

 

만약 Bitbucket 사용법이 궁금할 시 여기 클릭해주세요.

 

 

참고

https://nolboo.kim/blog/2013/10/06/github-for-beginner/

https://stackoverflow.com/questions/17857283/permission-denied-error-on-github-push

반응형
댓글