IT박스

'heroku'는 자식 저장소가 아닙니다.

itboxs 2020. 6. 9. 22:15
반응형

'heroku'는 자식 저장소가 아닙니다.


앱을 Heroku로 푸시하려고하면 다음과 같은 응답이 나타납니다.

fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.

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

'heroku keys : add'를 시도했지만 여전히 동일한 결과가 나타납니다. 내 GitHub 계정에 대한 ssh 키가 이미 있습니다.


Heroku 앱을 Git 리모컨으로 추가하려면을 실행해야합니다 heroku git:remote -a yourapp.

출처 : Git으로 배포


루트 디렉토리에서 다음을 시도 할 수 있습니다.

// 프로젝트를 위해 자식을 초기화하고 변경 사항을 추가하고 커밋을 수행합니다.

git init
git add .
git commit -m "first commit"

// heroku 앱을 만들고 heroku로 푸시

heroku create
git push heroku master

현재 진행중인 위치가 확실하지 않습니다. heroku에 배포하기 위해 github이 필요하지 않으며 git 만 있습니다. 도움이 되었기를 바랍니다!


먼저, heroku에 로그인했는지 확인하십시오 :

heroku login 

자격 증명을 입력하십시오.

복제 된 자식 저장소를 새 컴퓨터에 사용할 때이 오류가 발생하는 것이 일반적입니다. heroku 자격 증명이 이미 컴퓨터에 있어도 복제 된 repo와 heroku 사이에는 아직 로컬로 링크가 없습니다. 이렇게하려면 복제 된 리포지토리의 루트 디렉토리로 이동하여 다음을 실행하십시오.

heroku git:remote -a yourapp

다음 단계를 수행하십시오.

$ heroku login

새로운 Git 리포지토리 생성
새로운 또는 기존 디렉토리에서 git 리포지토리 초기화

$ cd my-project/
$ git init
$ heroku git:remote -a appname

응용 프로그램 배포
코드를 리포지토리에 커밋하고 Git을 사용하여 Heroku에 배포하십시오.

$ git add . 
$ git commit -am "make it better"
$ git push heroku master

기존 Git 리포지토리
기존 리포지토리의 경우 단순히 heroku 리모컨을 추가하십시오.

$ heroku git:remote -a appname

다음 공식 Heroku 기사 :

GIT 초기화

$ cd myapp
$ git init

$ git add .
$ git commit -m "my first commit"

그런 다음 다음을 사용하여 heroku 앱을 작성 (초기화)하십시오.

$ heroku create YourAppName

마지막으로 git remote를 추가하십시오.

$ heroku git:remote -a YourAppName

이제 다음을 사용하여 앱을 안전하게 배포 할 수 있습니다.

$ git push heroku master

You should wait for some time and see if you don't get any error/interrupt on console while deploying. For details look at heroku article.


Might be worth checking the config file in the .git folder. If the heroku parameters are missing then you´ll get this error heroku param

[remote "heroku"]
    url = git@heroku.com:`[Your heroku app].git
    fetch = +refs/heads/*:refs/remotes/heroku/*

the .git folder should be in the local computer file directory for the app you created in heroku. e.g C:\Users\You\Your app.git

Hope this helps


My problem was that I used git (instead of heroku git) to clone the app. Then I had to:

git remote add heroku git@heroku.com:MyApp.git

Remember to change MyApp to your app name.

Then I could proceed:

git push heroku master

For me the answer was to cd into the root directory of the app before running heroku create or git push heroku master


If this error pops up, its because there is no remote named Heroku. When you do a Heroku create, if the git remote doesn’t already exist, we automatically create one (assuming you are in a git repo). To view your remotes type in:

git remote -v”. # For an app called ‘appname’ you will see the following:

$ git remote -v
heroku git@heroku.com:appname.git (fetch)
heroku git@heroku.com:appname.git (push)

If you see a remote for your app, you can just “git push master” and replace with the actual remote name.

If it’s missing, you can add the remote with the following command:

git remote add heroku git@heroku.com:appname.git

If you’ve already added a remote called Heroku, you may get an error like this:

fatal: remote heroku already exists.

so, then remove the existing remote and add it again with the above command:

git remote rm heroku

Hope this helps…


I encountered the same error making a much more novice mistake: I was typing in Heroku with a capital "H," instead of lowercase.

I recognize that's certainly not the solution for everyone who encounters this error, but it was in my case.


I got the same error and it turned out I was in the wrong directory. It's a simple mistake to make so double check that you are in the root and then run heroku create and heroku git push master again. Of course you must have done git init, as mentioned in StickMaNX answer above, already before the heroku steps.


Run this

heroku create

before pushing your code.


For those who are trying to get heroku to work on codeanywhere IDE:

heroku login
git remote add heroku git@heroku.com:MyApp.git
git push heroku

I had to run the Windows Command Prompt with Administrator privileges


The following commands will work well for ruby on rails application deployment on heroku if heroku is already installed on developers machine. # indicates a comment

  1. heroku login
  2. heroku create
  3. heroku keys:add #this adds local machines keys to heroku so as to avoid repeated password entry
  4. git push heroku master
  5. heroku rename new-application-name #rename application to the preferred name other than the auto generated heroku name

In my case, I was already logged-in and I just executed git push.


I had the same issue, but later I found out that I forgot to create an app before deploying it. Try the following steps in terminal.

heroku login
heroku create

I am just learning heroku and often forget the steps so I wrote an article about it. You can find it here: https://medium.com/@saurav.panthee/deploy-flask-app-to-heroku-under-3-minutes-2ec1c0bc403a


I've seen all the answers here and the only thing missing is after going through these steps:

$ git add .
$ git commit -m "first heroku commit"

You should run the command below:

$ heroku git:remote -a <YourAppNameOnHeroku>

And lastly, run this:

$ git push -f heroku <NameOfBranch>:master

Notice I used <NameOfBranch> because if you're currently in a different branch to master it would still throw errors, so If you are working in master use master, else put the name of the branch there.

참고URL : https://stackoverflow.com/questions/18406721/heroku-does-not-appear-to-be-a-git-repository

반응형