fatal: HTTP request failed - ruby-on-rails

I unload the application ROR on Heroku and I face a problem: fatal: HTTP request failed and other problem: error: The requested URL returned error: 403 while accessing 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

It seems you don't have access rights to the repository. If so:
Check the settings on your repo
Try to push using a SSH URL for the remote (all about git remote URLs here).
Another issue could be that the repo already exists… if you'd try to push to an existing repository, that would fail to prevent data loss.

Related

Bitbucket Authentication failed on pushing existing project

This is the error on my terminal:
Authentication failed for 'https://bitbucket.org/railstutorial/sample_app_4th_ed.git/'
This is what I did:
git remote add origin ssh://git#bitbucket.org/kboygitgit/sample_app.git
git push -u origin master
then it asked for my username and password
then the error showed up
remote: Unauthorized
fatal: Authentication failed for 'https://bitbucket.org/railstutorial/sample_app_4th_ed.git/'

error: RPC failed; result=52, HTTP code = 0 fatal: The remote end hung up unexpectedly

When I'm pushing or cloning my project to/form bit-bucket it shows me
error: RPC failed; result=52, HTTP code = 0
fatal: The remote end hung up unexpectedly
I have used these but no result found :
git config --global http.postBuffer 524288000
git config --global http.postBuffer 1048576000
I did not solve my problem yet. Please suggest me.
Have you tried cloning it via SSH?
Lets assume you've tried to clone with the command:
git clone https://USER#bitbucket.org/TEAM/PROJECT.git
Now to clone that repo via ssh, the command should look something like this:
git clone git#bitbucket.org:TEAM/PROJECT.git
However for this to work, you need to upload your public ssh key into bitbucket.
On your machine you can find out your ssh public key with the command:
cat ~/.ssh/*.pub
You need to add this key on the bitbucket site (change the USER part of the URL to your username):
https://bitbucket.org/account/user/USER/ssh-keys/

Ruby on Rails tutorial chapter 1.4.3 (part about bitbucket)

I'm having some trouble setting up the bitbucket repo
humantoast#rails-tutorial:~/workspace/hello_app (master) $ git remote add origin git#bitbucket.org:HumanToast/hello_app.git
fatal: remote origin already exists.
.
humantoast#rails-tutorial:~/workspace/hello_app (master) $ git push -u origin --all
conq: repository does not exist.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I just want to say that I tried the following and it seems to have worked. Note that '<username>' refers to your username. If on a numbered list, replace <username> with your username.
Enter the numbered commands below into the terminal. 'Result' is the output the terminal showed after the command was entered
git remote -v
Result
origin git#bucket.org:/hello_app.git (fetch)
origin git#bucket.org:/hello_app.git (push)
git remote rm origin
Result
No output in the terminal
git remote add origin git#bitbucket.org:<username>/hello_app.git
git push -u origin --all # pushes up the repo and its refs for the first time
Result (note the 3 dots below refers to output on the terminal that I excluded due to it potentially containing confidential information)
.
.
.
Are you sure you want to continue connecting (yes/no)?
yes
Result
.
.
.
To git#bitbucket.org:<username>/hello_app.git
[new branch] master -> master
Branch master set up to track remote branch master from origin.
That seems to have done the trick. I wasted a day stuck so early in the book.

Git push origin master fatal error: Permission to railstutorial/first_app.git denied

I'm trying to git push origin master using Michael Hartl's rails tutorials (first_app), but i'm getting this problem:
[first_app]$git push origin master
ERROR: Permission to railstutorial/first_app.git denied to tomkim
fatal: The remote end hung up unexpectedly
I've re-entered an SSH key, but that's not it. I've never had this problem before, but now I am.
Help's greatly appreciated.
You need to add your own repo as the remote (of course you need to create a first_app repo on Github first):
$ git remote rm origin
$ git remote add origin git#github.com:tomkim/first_app.git
$ git push -u origin master
And tomkim is your github account name, right? If not, change it to yours.
I was able to figure this out. I noticed that the origin was showing "railstutorial/first_app.git", when that it should've been tomkim310/first_app.git. The problem to begin with was follow Hartl's tutorial, I was just typing as he was going. Simply doing a new "git remote add origin git#github.com:tomkim310/first_app.git" does not do the trick.
I verified this by typing in: git remote -v which gave origin git#github.com:railstutorial/first_app.git. To change it, i typed: git config remote.origin.url git#github.com:tomkim310/first_app.git.
This then did the trick and git push origin master worked.

GitHub ERROR: Repository not found. fatal: The remote end hung up unexpectedly

I'm trying to follow along Michael Hartl's Ruby on Rails tutorial http://ruby.railstutorial.org/chapters/beginning#fnref:1.16, but I've run across an error. I signed up on GitHub and issued a new SSH key and made a new repository. But when I try to push my repository up to GitHub I get the following error:
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
Any ideas?
Here are some of the commands I entered into the terminal:
Parkers-MacBook-Pro:.ssh ppreyer$ git remote add origin git#github.com:ppreyer/first_app.git
Parkers-MacBook-Pro:.ssh ppreyer$ git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly – ppreyer 6 mins ago
And here is what git remote -v shows:
Parkers-MacBook-Pro:.ssh ppreyer$ git remote -v
github git#github.com:ppreyer/first_app.git (fetch)
github git#github.com:ppreyer/first_app.git (push)
origin git#github.com:ppreyer/first_app.git (fetch)
origin git#github.com:ppreyer/first_app.git (push)
Your repository was called "MyFirstRailsApp" but it appears you've deleted it. That's the reason for your error.

Resources