簡體   English   中英

在Windows + Git bash中Heroku推送失敗

[英]Heroku push failed in Windows + Git bash

我執行:

> heroku login

並介紹我的Heroku用戶名和密碼,我得到:

Logged in as l*********.com

我可以成功執行:

> heroku auth:token
cccc8aa0-aaaa-aaaa-aaaa-bbbb03b38932

之后,我執行:

> git push heroku master

但我得到:

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/git#http-git-authentication
fatal: Authentication failed for 'https://git.heroku.com/myapp.git/'

我究竟做錯了什么? 它說我不應該“不使用git使用用戶名和密碼進行身份驗證” ..但是在那種情況下,我該怎么辦? 文檔說:

您無法使用Heroku用戶名(電子郵件)和密碼通過Heroku HTTP Git端點進行身份驗證。 如本節所述使用API​​密鑰

但是很難理解我應該實際做什么。

我能夠使用SSH協議修復它:

  1. 生成密鑰: ssh-keygen -t rsa

  2. 將其上傳到Heroku heroku keys:add

  3. 切換到SSH: git config --global url.ssh://git@heroku.com/.insteadOf https://git.heroku.com/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM