正在将应用程序更新到heroku

2024-10-03 09:12:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我在heroku服务器上运行应用程序。我克隆了它做了一些改变,我想把它推回去。我将远程heroku repo添加到本地存储库中,但当我要推送它时:

Fetching repository, done.
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 290 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)

Connection to 10.185.171.142 closed by remote host.
, done.
error: did not receive remote status

更新 当我运行git remote-v时:

heroku git@heroku.com:wierszyki.git (fetch)
heroku git@heroku.com:wierszyki.git (push)
origin git@heroku.com:wierszyki.git (fetch)
origin git@heroku.com:wierszyki.git (push)

Tags: togit服务器com应用程序herokubytesobjects
2条回答

我可能会说这不是heroku authentication就是git remote问题

你知道吗

<强>1。Heroku身份验证

当您推送到任何远程gitrepo时,您必须使用服务进行身份验证。你知道吗

大多数服务使用RSA-key进行加密的SSH传输,这意味着如果您希望heroku接受传入的推送,则必须确保您的身份验证正确。你知道吗

由于您已经从remoterepo克隆了repo,因此您可能需要使用Heroku重新进行身份验证,该过程主要通过下载或重新安装^{}来实现

如果您下载此文件并重新验证您的系统,它可能会解决您的问题

你知道吗

<强>2。远程Git

您还可能对remotegit有问题

如果您刚刚克隆了回购,我猜您可能对remote回购的连接方式有问题。解决这个问题的最可靠的方法就是去掉remoteheroku回购并添加一个新回购:

$ git remote rm heroku
$ git remote add heroku git@heroku.com[your repo]

请注意,错误消息“未收到远程状态”将随Git 2.13(2017年第2季度)而更改

commit d1a13d3commit ba69f92commit 40d05d0commit f7cd74dcommit 7c39df2commit 6cdad1f(2017年3月7日)作者Jeff King (^{})
(由Junio C Hamano ^{} commit f4d3af1合并,2017年3月24日)

具体而言,commit 40d05d0包括:

send-pack: improve unpack-status error messages

When the remote tells us that the "unpack" step failed, we show an error message. However, unless you are familiar with the internals of send-pack and receive-pack, it was not clear that this represented an error on the remote side.
Let's re-word to make that more obvious.

Likewise, when we got an unexpected packet from the other end, we complained with a vague message but did not actually show the packet.
Let's fix that.

错误消息变为:

unable to parse remote unpack status

相关问题 更多 >