Github 오류 모음
For Github Debug
Github 오류 정리
깃허브 블로그 및 깃허브에 관련한 오류 정리
snake.yml
1 2 3 4 5 # snake.yml 오류 ''' Error msg : The process '/usr/bin/git' failed with exit code 128 ''' Action 구동 상에서 오류가 생겼는데 찾아본 결과 Token의 기간이 만료되어 재발급 해주는 방식으로 오류를 해결했다.
- 프로필 사진 클릭 - settings
- 왼쪽 바에 “Developer settings” - “Personal access tokens” - Tokens(classic)
- 우측 상단의 “Generate new token (classic)
- 여기서 Expiration의 기간을 설정하고(보안상 문제 없고 자주 바꾸기 귀찮으면 1년정도로), Select scopes에서 “repo”, “workflow”, “admin:org”의 “read:org” 정도만 체크해도 되는데 안되는 경우 모두 체크하고 하는 방법도 있다.
- 이후에 토큰이 생성되면 이 토큰 번호는 따로 저장해 둔다.
- 그리고 본인 snake.yml이 있는 레포로 이동한 후, 상단에 “Settings” - 왼쪽바에 “Secrets and variables” - “Actions”를 클릭한다.
- “New repository secret”을 누르고 제목을 반드시 “GH_TOKEN”으로 한 후, 내용에는 발급받은 토큰을 입력한다.(이걸 넣어야 꼭 되는지는 확실하진 않지만 경험상 발급 코드를 넣었을 때 실행이 되었다)
- 이후에 snake 레포 상단에 “Actions”를 누르고 왼쪽 바에 “generate animation”을 누르고 “Run workflow”를 열고 초록색 “Run workflow”를 누르면 정상적으로 실행이 되었다면 다음과 같이 초록색 체크 표시가 뜰 것이다.
ruby
1 2 3 4 5 # ruby update >> rbenv install -l # 설치 가능한 버전 확인 >> rbenv install 3.4.1 # 원하는 버전 인스톨 >> rbenv global 3.4.1 # 전역 설정 >> ruby -v # 설치 버전 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # ruby version error ''' Error msg : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.6.3) required by your /Users/rogershun/Desktop/RH/Projects/RogersHun.github.io/Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run `bundle update --bundler`. To install the missing version, run `gem install bundler:2.6.3` from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path' from /usr/bin/bundle:23:in `<main>' ''' >> which ruby #만약 /usr/bin/ruby 로 출력된다면 맥 기본 루비를 사용중임 >> ruby -v # 이걸 찍어보면 맥 디폹트 루비 버전이 출력됨 ex. ruby 2.6.10p210... >> brew update # homebrew를 통해서 업데이트 해줘야함 / homebrew가 있다는 가정하에 >> brew install ruby >> echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc # 환경변수 설정 >> which ruby # 다시 확인해보면 /homwbrew/ 밑에 ruby가 설치된 걸 확인할 수 있음 >> bundle exec jekyll serve # 이후에 실행하면 해결됨
Action
1 2 3 4 5 6 # Action 실행 오류 ''' Error msg: The current runner (ubuntu-24.04-x64) was detected as self-hosted because the platform does not match a GitHub-hosted runner image (or that image is deprecated and no longer supported). ''' # 해당 개발자가 제공한 2번 build-pages.yml을 수정하고 post 중에 하나를 수정해서 올리니까 이전꺼 포함해서 다 올라감 https://github.com/natalieagus/50002/issues/40
1 2 3 4 5 6 # push 후 업로드 안될 때 ''' _site 폴더가 이전 배포본으로 남아있어 업데이트 되지 않을 가능성이 있어서 캐시를 초기화하는 방식을 사용해봄 ''' >> bundle exec jekyll clean >> bundle exec jekyll build
This post is licensed under CC BY 4.0 by the author.