에러 내용
깃헙에서 workflow 내용을 수정하고 github 저장소에 push하니까 위 에러가 떴다.
내용은 다음과 같다.
! [remote rejected] {원격저장소 branch명} -> {원격저장소 branch명} (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/code-style-check.yaml` without `workflow` scope) error: failed to push some refs to 'https://github.com/{원격저장소 링크}'
메세지 내용을 살펴보면 github에서 발급받은 개인 access token이 workflow를 수정할 수 있는 권한이 없다는 내용이다.
이 문제는 access token에 권한을 허용해주면 간단히 해결된다.
해결 방법
https://github.com/settings/tokens
GitHub: Where the world builds software
GitHub is where over 83 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat...
github.com
먼저 깃헙의 개인 access token을 관리하는 링크로 접속한다.
그리고 해당되는 token을 선택한다.
token 옆에는 현재 허용된 권한들이 나오게 되는데, repo에 대한 접근만 허용된 것을 볼 수 있다.
token을 클릭하면 허용된 작업들이 나온다.
여기서 workflow를 클릭하고, 아래의 update token 버튼을 누르면 push가 정상적으로 작동한다.
참조
'서버 및 환경 > Git' 카테고리의 다른 글
[git] copy한 레포에서 submodule이 있을 때 초기화 방법 (0) | 2023.12.20 |
---|---|
[Git] 깃 브랜치 만들기 / 변경 / 삭제 (git branch / checkout / -d) (0) | 2022.11.27 |
[Github] Pull Request (PR) 요청 (2) | 2022.11.18 |
[Git] git에 add / commit / push 하기 (파일 등록부터 업로드까지) (2) | 2022.11.05 |
[Git] Git 로컬 저장소 생성 및 원격 저장소와의 연결, 복제 (git init / git remote / git pull / git clone) (0) | 2022.11.04 |