致命:HTTP请求失败

时间:2014-06-20 15:32:33

标签: ruby-on-rails git heroku github

我在Heroku上卸载应用程序ROR并且我遇到了一个问题:致命:HTTP请求失败和其他问题:错误:请求的URL返回错误:403访问https://github.com/priroda/first_app.git/info/refs

ark@ark-Aspire-5750G:~$ mkdir rails_projects
ark@ark-Aspire-5750G:~$ cd rails_projects
ark@ark-Aspire-5750G:~/rails_projects$ rails new first_app
ark@ark-Aspire-5750G:~/rails_projects$ cd first_app
ark@ark-Aspire-5750G:~/rails_projects/first_app$ git init
Initialized empty Git repository in /home/ark/rails_projects/first_app/.git/
ark@ark-Aspire-5750G:~/rails_projects/first_app$ git add .
ark@ark-Aspire-5750G:~/rails_projects/first_app$ git commit -m "Initialize repository"

ark@ark-Aspire-5750G:~/rails_projects/first_app$ git log
commit e8586bdf77a1aa260c25987c4860891333659033
Author: Ark <kotinoka2014@rambler.ru>
Date:   Fri Jun 20 19:21:19 2014 +0400

    Initialize repository

ark@ark-Aspire-5750G:~/rails_projects/first_app$ git remote add origin https://github.com/priroda/first_app.git

ark@ark-Aspire-5750G:~/rails_projects/first_app$ git push -u origin master
Username for 'https://github.com': priroda
Password for 'https://priroda@github.com': 
error: The requested URL returned error: 403 while accessing https://github.com/priroda/first_app.git/info/refs
fatal: HTTP request failed

1 个答案:

答案 0 :(得分:1)

您似乎没有对存储库的访问权限。如果是这样的话:

  • 检查您的repo上的设置
  • 尝试使用远程的SSH URL(所有关于git远程URL here)。

另一个问题可能是repo已经存在......如果你试图推送到现有的存储库,那将无法防止数据丢失。