[GCP] Repository Permission denied error

He SEO·2022년 3월 14일
0
post-thumbnail

문제 사항

Git repository에 소스를 업로드 하려는데 아래와 같은 에러 발생.
권한 문제라는 답변이 많았으나 나는 해당되지 않음

heseo@source.developers.google.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

해결 과정

  • 기존에 git을 계속 사용했지만 에러가 발생하여, git 설정을 다시 해줌 -> 실패

로그에 ssh 주소로 되어 있어서 삭제하고 https 주소를 다시 등록

git remote -v

로그를 보니 ssh 주소로 설정되어 있음

google  ssh://heseo@source.developers.google.com:PORT/p/PROJECT_NAME/r/nyang (fetch)
google  ssh://chloe.hong@pandora.tv@source.developers.google.com:PORT/p/PROJECT_NAME/r/nyang (push)

삭제 후 https로 다시 등록

git remote rm google
git remote add google https://ource.developers.google.com:PORT/p/PROJECT_NAME/r/nyang

add -> commit -> push 진행

바로 Push 하라는 안내가 있었는데 먹히지 않음 🚨

git push --all master 

결과를 보면 push할게 없다고...

No refs in common and none specified; doing nothing.
Perhaps you should specify a branch.
Everything up-to-date

순리대로 진행한다 🧩

git add *
git commit -m "base source"
git push --all master
profile
BACKEND 개발 기록 중. 감사합니다 😘

0개의 댓글