如何在 Heroku 上部署网站?
How to deploy a website on Heroku?
我不知道在 的用户名和 r 命令后的 r 的密码git push heroku master:
C:\code2015>git push heroku master
Username for 'https://git.heroku.com': nemo
Password for 'https://nemo@git.heroku.com':
remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry
the git command.
remote: ! See documentation for details:
https://devcenter.heroku.com/articles/http-git#authentication
fatal: Authentication failed for 'https://git.heroku.com/django-blog.git/'
我看过文档,还是不太明白。
C:\code2015>heroku login
Enter your Heroku credentials.
Email: nemo@yandex.ru
Password (typing will be hidden):
Authentication successful.
要能够推送到 heroku git 存储库,您必须使用 heroku gem
登录
heroku login
然后您可以使用常规 git 命令。再试一次
heroku login
git push heroku master
发生这种情况是因为在找到 _netrc
时主文件夹与工具带和 git 不相同。你能告诉我以下每一项的输出吗?
echo %HOME%
echo %HOMEDRIVE%%HOMEPATH%
echo %USERPROFILE%
echo %HOMESHARE%
然后你需要找出_netrc
文件在哪里,将它复制到上面的路径之一,找出哪个是正确的位置。让我知道哪一个最适合你。
我遇到了类似的问题,
heroku login
正在我的用户目录中保存 _netrc 文件(%USERPROFILE%,与 %HOMEDRIVE%%HOMEPATH% 相同)
但是 GIT 没有使用它(看起来它只读取 %HOME% 变量)。我设
%HOME%
可变为相同的值(所以现在是c:\user\<my account>\
并且还有_netrc文件)
GIT开始工作
只是为了更明确。
这适用于 Windows 8.
在 cmd 中执行:
set HOME=%USERPROFILE%
对于我的情况,我有 "identity crises",因为我通过 cygwin 安装了 git,同时我使用了 Heroku 的工具带:heroku 在 DOS 命令控制台 (CMD) 中成功登录。
对于 CMD,%HOME% 是 c:\Users\my-id
对于 cygwin,$HOME 不同
我发现_netrc同时放在了$HOME和%HOME%
我不得不
copy $HOME/_netrc $HOME/.netrc
然后
git push heroku master
成功。
我不知道在 的用户名和 r 命令后的 r 的密码git push heroku master:
C:\code2015>git push heroku master
Username for 'https://git.heroku.com': nemo
Password for 'https://nemo@git.heroku.com':
remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry
the git command.
remote: ! See documentation for details:
https://devcenter.heroku.com/articles/http-git#authentication
fatal: Authentication failed for 'https://git.heroku.com/django-blog.git/'
我看过文档,还是不太明白。
C:\code2015>heroku login
Enter your Heroku credentials.
Email: nemo@yandex.ru
Password (typing will be hidden):
Authentication successful.
要能够推送到 heroku git 存储库,您必须使用 heroku gem
登录heroku login
然后您可以使用常规 git 命令。再试一次
heroku login
git push heroku master
发生这种情况是因为在找到 _netrc
时主文件夹与工具带和 git 不相同。你能告诉我以下每一项的输出吗?
echo %HOME%
echo %HOMEDRIVE%%HOMEPATH%
echo %USERPROFILE%
echo %HOMESHARE%
然后你需要找出_netrc
文件在哪里,将它复制到上面的路径之一,找出哪个是正确的位置。让我知道哪一个最适合你。
我遇到了类似的问题,
heroku login
正在我的用户目录中保存 _netrc 文件(%USERPROFILE%,与 %HOMEDRIVE%%HOMEPATH% 相同) 但是 GIT 没有使用它(看起来它只读取 %HOME% 变量)。我设
%HOME%
可变为相同的值(所以现在是c:\user\<my account>\
并且还有_netrc文件)
GIT开始工作
只是为了更明确。
这适用于 Windows 8.
在 cmd 中执行:
set HOME=%USERPROFILE%
对于我的情况,我有 "identity crises",因为我通过 cygwin 安装了 git,同时我使用了 Heroku 的工具带:heroku 在 DOS 命令控制台 (CMD) 中成功登录。
对于 CMD,%HOME% 是 c:\Users\my-id
对于 cygwin,$HOME 不同
我发现_netrc同时放在了$HOME和%HOME%
我不得不
copy $HOME/_netrc $HOME/.netrc
然后
git push heroku master
成功。