2017-05-03 43 views
0

我正在构建一个为我的公司部署heroku应用程序的heroku应用程序。设置一个应用程序的heroku凭证ON heroku

我正在使用gitpython和heroku3等库来管理我的应用程序,并且在我的本地笔记本电脑上一切正常。

然而,当我把它推出来的Heroku我收到此错误:

2017-05-03T16:31:43.368895+00:00 app[web.1]: cmdline: git push --set-upstream heroku master 
2017-05-03T16:31:43.368896+00:00 app[web.1]: stderr: 'fatal: could not read Username for 'https://git.heroku.com': No such device or address' 

基本上,这个错误是说,我的应用程序的Heroku的凭据没有被正确初始化。

(我在我的本地计算机上执行heroku auth:logout并重新运行我的脚本:我的确是提示在终端上的用户名和密码)

如何将我的Heroku的凭据添加到我的git客户如果我的git客户端不是我的终端?是否有一些git config我可以运行设置我的gitpython管理的git客户端的heroku用户名和密码?

===

我知道~/.netrc文件我的本地计算机上运行heroku auth:login后产生。但是,如果我的应用程序在heroku上运行,我不知道该文件的放置位置。

+0

您使用的是Github吗? –

+0

不,我现在选择使用.netrc文件。 – Sparrowcide

回答

0

是的https://git.heroku.com的URL是不正确的。当你创建应用程序时,你应该有一个URL为https://example.herokuapp.com/ | https://git.heroku.com/example.git。后者是你推动的那个。你是否在你的根目录下运行了git init

关于此的Heroku也很多很好的信息。