Heroku CLI身份验证问题 [英] Heroku CLI authentication issue

查看:352
本文介绍了Heroku CLI身份验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 7上全新安装Heroku之后,我似乎无法从命令行进行身份验证.

After a fresh install of Heroku on Windows 7, I can't seem to authenticate from the command-line.

运行命令:heroku login提示我输入凭据.这样做之后,我收到一个错误:

Running the command: heroku login prompts me to enter my credentials. After doing so, I received an error:

heroku: Enter your login credentials
Email: my_email
Password: ************
Error: ENOENT: no such file or directory, open 'z:/_netrc'

我正在使用PowerShell,并且当我运行命令cat z:/_netrc时,出现此错误:

I am using PowerShell, and when I run the command cat z:/_netrc, I get this error:

cat : Cannot find drive. A drive with the name 'z' does not exist.

Z:是网络驱动器,可从文件资源管理器访问.

Z: is a network drive, and it is accessible from the file explorer.

我的%HOME%路径中已经有一个.netrc文件,但是它不包含heroku登录凭据.

I already have a .netrc file in my %HOME% path, but it does not contain the heroku login credentials.

查看官方文档和CLI帮助,找不到解决此问题的有用方法.如何登录到我的heroku帐户?

Looking at the official documentation and CLI help, I couldn't find anything useful to fix this. How can I login to my heroku account?

> heroku version
heroku/7.16.6 win32-x64 node-v10.11.0

推荐答案

因此,问题是由于无法在本地计算机上找到完成Heroku登录所需的_netrc文件而引起的.我决定将文件创建到Windows 10计算机的以下位置:

So, the issue is arising from not finding _netrc file on your local computer that is required to complete login with Heroku. I have decided to create the file into following location of my windows 10 computer:

cmd>set HomeDrive=C:/Users/your Windows username/AppData/Local/heroku

就我而言,

cmd>set HomeDrive=C:/Users/CrazyMoby/AppData/Local/heroku 

最后我跑了heroku login

以上步骤解决了我的heroku登录问题.

The above step resolved heroku login issue in my case.

这篇关于Heroku CLI身份验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆