gpt4 book ai didi

heroku - ssh : connect to host heroku. com 端口 22:连接超时

转载 作者:行者123 更新时间:2023-12-02 09:58:37 26 4
gpt4 key购买 nike

我正在使用 Ubuntu 11.10我的 git-repo 的本地分支是最新的

然后我在终端中编写了以下命令:

heroku create --stack cedar

并且打印了这个错误:

Notice: on Wed, 20 June, our default stack will change to Cedar. <Shortened Blog URL>

Creating radiant-wind-7413... done, stack is cedar
http://radiant-wind-7413.herokuapp.com/ | git@heroku.com:radiant-wind-7413.git
Git remote heroku added

Blog URL on the Wayback Machine 1

到目前为止一切都很好,然后我在终端中输入以下内容:

git push heroku master

并且出现以下错误:

ssh: connect to host heroku.com port 22: Connection timed out  
fatal: The remote end hung up unexpectedly
<小时/>

1 注意:2012 年允许缩短 URL,但 shortened URLs have now been blacklisted

最佳答案

自 2021 年 11 月 30 日起,Heroku 已弃用 SSH Git 传输功能,仅支持 HTTP 传输。 SSH 真正关闭是在 2022 年 3 月。

您必须使用以下命令重新配置存储库:

heroku git:remote -a <app-name>

Official statement from Heroku

如果您使用具有不同名称的 Remote ,例如生产然后使用

heroku git:remote -a <app-name> -r <remote-name>

也许您必须在 git 全局配置上取消设置 ssh 连接:

git config --global --unset url.ssh://git@heroku/.insteadof
git config --global --unset url.ssh://git@heroku.com/.insteadof

关于heroku - ssh : connect to host heroku. com 端口 22:连接超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10968591/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com