git push heroku master
Heroku Git을 이용해 Deploy를 하는 과정에서 다음과 같은 push 명령어를 사용하니 아래의 에러가 발생했다.
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/[application-name].git'
해결 방법
1. 지원되는 앱(Rails, Django 등)이 포함된 repository를 push하고 있으며, 테스트를 하기위해 무작위의 repository를 푸시하는 것이 아닌지 확인한다.
Newbie in Heroku: Error when push my app to Heroku
I am using Ubuntu 10.04. By following the tutorial here, I have created Heroku account, installed GIT and Heroku successfully. I have uploaded the SSH key and add heroku to my system PATH. After ...
stackoverflow.com
git init
git add
git commit -m ""
heroku create
git push heroku master
2. package-lock.json 또는 yarn.lock 파일을 사용 중인지 확인한다.
종속성을 설치하는 데 하나의 lock 파일만 사용할 수 있기 때문에, package-lock.json 또는 yarn.lock를 삭제한다.
나는 package-lock.json을 삭제하는 방법으로 문제를 해결했다.
Reference
git, Heroku: pre-receive hook declined
I am in the process of setting up a git repository and attempting to link it to Heroku. When I run the command git push heroku master I receive Counting objects: 7, done. Delta compression usin...
stackoverflow.com
'BackEnd > Error' 카테고리의 다른 글
[ubuntu] dpkg was interrupted Error 해결 방법 (1) | 2021.01.08 |
---|
댓글