git push heroku master error: Could not read - ruby-on-rails

I tried looking through some git push heroku master errors on this website, but I couldn't find one with my specific problem. Hopefully you guys can help me.
When I run git push heroku master
error: Could not read 6f2abfc273544edc8fa8fbf18837a9ecec606bb2
fatal: bad tree object 6f2abfc273544edc8fa8fbf18837a9ecec606bb2
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'https://git.heroku.com/still-harbor-74893.git'
fatal: write error: Bad file descriptor`
I've read that Heroku sets a hard limit on file sizes, is that the problem?

Check whether your github file is corrupted or not. Or maybe one of the file is corrupted. I can't think of anything else that might be the problem here.

I'm guessing that your repository/current directory is broken. If you think that your current working directory contains uncorrupted files, then you can always re-initialize Git in your working directory. For example:
rm -rf .git
git init
git add .
git commit -m 'Re-initialize repo.'
And then try to push to heroku.

Related

fatal: Unable to find remote helper for 'http'

I had tried to clone my repository on Solaris using git bash but I got the below error
Cloning into 'devops'...
warning: templates not found /usr/local/share/git-core/templates
fatal: Unable to find remote helper for 'http'
I have always seen that error message when Git was compiled without curl-devel installed.
For Solaris, that would be CSWlibcurl-dev/.
Once installed, recompile Git and you are good to go.

Unable to negotiate a key exchange method with Mina deployment

I'm encountering a message like this while deploying with Mina, but not sure why Git is not able to pull the repo.
I've tried switching sshd_config due to Unable to negotiate a key exchange method message, but still can't figure things out. Thanks for helping.
-----> Creating a temporary build path
$ touch "deploy.lock"
$ mkdir -p "$build_path"
$ cd "$build_path"
-----> Cloning the Git repository
$ git clone "git#github.com:repo/project.git" "/home/deploy/project/scm" --bare
Cloning into bare repository '/home/deploy/project/scm'...
Unable to negotiate a key exchange method
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
! ERROR: Deploy failed.
-----> Cleaning up build
$ rm -rf "$build_path"
Unlinking current
$ rm -f "deploy.lock"
OK
! Command failed.
Failed with status 1 (19)
The issue is, that your local SSH client and the remote endpoint at GitHub are unable to agree on a common key exchange method.
This will mostly occur when you poked around with the set of available Key exchange methods or you are using a very old & outdated SSH client which does not support any method which is still regarded as safe.
Interestingly this only occurs on some GitHub Repos: I'm still able to pull from other reports.
To diagnose you can set the following environment variable to see more of the SSH output:
export GIT_SSH_COMMAND="ssh -vv"
To fix it, I added a custom entry in my config_ssh or ~/.ssh/.config allowing more legacy algorithms for that host. Please note this should appear above any Host * section:
# Github needs diffie-hellman-group-exchange-sha1 some of the
# time but not always.
Host github.com
KexAlgorithms curve25519-sha256#libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1

Gitlab Error - Repository doesn't exist

I had installed gitlab 6 a month ago, there was no problem and all was working fine, until recently it started showing me the following error, when I push into a newly created repository it gives me the following error:
fatal: '/home/git/repositories/my_username/tester.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Output of git remote -v is as follows:
origin git#my_server.com:username/tester.git (fetch)
origin git#my_server.com:username/tester.git (push)
I also have no issue in pulling and pushing to my old repositories that are in gitlab.
What could be causing this?
Thanks
When you create a project in Gitlab - Gitlab adds a job to the queue to create a repository in the directory where the repository is stored. This operation is performed asynchronously by reason of the fact that for its implementation meets the component gitlab-shell. You can see the logs of his work (ex /home/git/gitlab-shell/gitlab-shell.log) in order to learn more details about a potential problem, but if it worked before - hardly something went wrong there.
Most likely your problem is related to the fact that the queue was either loaded or was not started or did not work correctly. Restarting of Sidekiq solves this problem. You can restart it by running the command:
bundle exec rake sidekiq:restart

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.

pushing to heroku git error

I have created a brand new heroku app, beforehand i deleted the old .git file from my app's directory and created a new one with the usual steps:
git init, git add ., git commit -m "new git"
all of which worked fine. I then created a new app like so and got the following error:
$ heroku create
Creating glowing-summer-56.... done
Created http://glowing-summer-56.heroku.com/ | git#heroku.com:glowing-summer-56.
git
Git remote heroku added
$ git push heroku master
Counting objects: 1553, done.
Delta compression using up to 4 threads.
fatal: object 91f5d3ee9e2edcd42e961ed2eb254d5181cbc734 inconsistent object lengt
h (387 vs 8985)
error: pack-objects died with strange error
error: failed to push some refs to 'git#heroku.com:glowing-summer-56.git'
This is strange to me, as it is a brand new .git file. How can I get rid of this without cleaning up each damaged object? Is there a way to just delete the git file and start anew? I'm not using this git file for anything other than pushing to heroku.
Also I should note that I am using Cygwin on windows and my git version is 1.6.6.1
I've come across this error before and fixed it, I just honestly can't remember how.
Finally, using git fsck --full yields nothing :(
Thanks,
i seemingly fixed this with: git reset

Resources