Please help. I have absoluty no idea what's wrong. The rails app works on my local machine.
If I do this:
git push heroku master
I get this:
Counting objects: 4195, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3944/3944), done.
Writing objects: 72% (3009/4178), 9.99 MiB | 73 KiB/s
Compressing objects: 100% (3944/3944), done.
**Connection to 10.46.xxx.xxx closed by remote host.KiB/s
error: pack-objects died of signal 13
error: failed to push some refs to 'git#heroku.com:gentle-rain-xxxx.git**
I just dealt with 24 hours of this hell. I re-cloned repos, destroyed apps, repacked, pruned... the whole 9 yards.
It turned out that I had a .txt file which was ~250MB in size that, even though I had removed it from my master branch, was still present in my local (as well as github) cache.
I checked out this page and inadvertently found my answer here:
https://help.github.com/articles/remove-sensitive-data
The .txt file had previously been in the doc/ folder, so I pointed this command at where the file would have been in any commits and ran it.
git filter-branch --index-filter 'git rm --cached --ignore-unmatch doc/US.txt'
This is very useful if you realize you have static assets of some sort that don't have to be in your repo and are causing you to get the signal 13 error.
I was having problems with a repository as small as 130MB. I don't really want to prune my repository, nor do I feel it is necessary.
I can't help but feel this is a problem with git and/or Heroku, I believe a big push should succeed, even over a "slow" or less than ideal connection.
How I solved/worked-around this issue was to spin up an EC2 instance, checkout my repo there, and push to github. In that way, my deploy speed was 4MiB/s (faster than my own 80KiB/s!). Furthermore, in the cases where the push would fail due to some configuration issues, I could quickly tweak and try again.
For more information on this technique, I've written up the full steps on how to spin up an EC2 instance for this purpose here: http://omegadelta.net/2013/06/16/pushing-large-repositories-to-heroku/
Hi I had the same problem trying push to cedar stack. I contacted heroku support and they fixed it. Here is what they said:
It appears to be due to a change in our git server on our end. I'll be
following up with our engineers to make sure we get a permanent fix
rolled out for this.
-Chris
This appears to just be a timeout from your push being too large.
I got around this by doing a git reset to a SHA that was around 500 commits back, pushing that, and then pushing the rest of my repo.
Related
Since a few days ago, I've been experiencing a repetitive crash on Xcode every 3-8 minutes.
The only tangible thing I can find in the crash logs is that it always shows:
Crashed Thread: Dispatch queue: DVTSourceControlGitXPCClient :: Proxy Completion Queue
It seems to be Source Control related, but I wonder how?
I will add everything related to my current project in case it is relevant:
Xcode 14.2 (14C18)
Using Source Control with GitHub
Swift targets iOS and macOS
SPM
It seems like some folks are experiencing a similar issue, as seen on the Developer Forums
Any leads as to why or how to solve it?
After some struggling I decided to check how was git doing, directly from the Terminal.
It turns out there were some things that didn't make sense, specifically a file I deleted from my project but then added again, was showing as modified, even though I had already committed all changes for that file a few days ago; but I had done it directly from Xcode Source Control.
From the Terminal, I staged all changes and committed them. Since then Xcode hasn't crashed for a few hours yet.
My limited understanding of the problem points out that Xcode had issues staging those changes I made a few days ago, and since then the repository has not been in a "healthy state"; Xcode tries somehow to understand the state of the repository but after a while, it just crashes.
Common scenarios where this could have happened:
A file was deleted
A file was renamed, specially with case-sensitive renames, for example from MyViewcontroller.swift to MyViewController.swift
The solution for me was to just put it back in a "healthy state", aka make a commit directly from the Terminal.
Example
From the Terminal
# navigate to the directory of your repository
$ cd /someFolder/myProjectApp
$ git status
# check that you get "nothing to commit"
# or if there are changes they should make sense
# if some changes do not make sense
# try staging and committing everything
# example:
$ git add .
$ git commit -m "Cleaning state"
I just completed Chapter One of the Ruby on Rails Tutorial by Hartl. Posted about one minor hitch previously. Now I started Chapter Two. I swear I did everything by the book, but now when I try:
git push -u origin master
I get the following messages after entering my passphrase:
ERROR: repository not found
fatal: could not read from remote repository
Please make sure you have the correct access rights and that the repository exists.
When I down loaded heroku tools I think it installed a second version of Ruby on my machine. In any case I now have two version listed under All Programs. Could this have screwed thing up? The two versions are Ruby 1.9.2-p290 and 1.9.3-p327. Also when I open the command prompt using 1.9.2 there is a weird thing at the top before I do anything:
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
This is then followed by the normal prompt on the next line. I'm wondering if the use of my public keys have some how gotten screwed up.
Any help would be appreciated.
You should add a new git remote.
check https://help.github.com/articles/adding-a-remote
So i had problems with windows and multiple versions of ruby too. I would recommend deinstalling all versions and only installing one ruby version. But thats not related to your Github problem i guess.
Switch via the commandline to your app folder and checkout:
git remote -v
it shows you what is the remote location for you app. And 5 bucks that its screwd up. You can remove the path by:
git remote rm origin
or if its only on heroku:
git remote rm heroku
and after that add the correct remote path again. Example:
git remote add origin git#github.com:foo/bar.git
That hopefuly fix it.
And keep in mind if you want to push to heroku use:
git push heroku master
I recently pushed a new and empty app with gemfile added up to heroku and it was added successfully. The folder size locally is 488kb but on heroku its slugsize is 6mb of 100mb. I did this after trying to push my real application that kept showing this error: fatal: sha1 file '' write error invalid argument. The size of this app locally is 3mb. Could this really be the problem why it isn't bing pushed. How on earth do i reduce this size even after adding .gitignore and .slugignore files. Thanks
Details on the slug size can be found here:
https://devcenter.heroku.com/articles/slug-compiler
The key part you might be interested in is:
You can roughly estimate slug size locally by doing a fresh checkout
of your app, deleting the .git directory, and running du -hsc.
$ du -hsc | grep total
You get 200mb maximum though, so I wouldn't worry about it.
The story:
I've been developing a RoR-app in both my desktop and laptop. It was quite handy to commit changes made on another, push them to github and fetch & merge on other.
The starting point is this: I committed latest changes on my desktop, pushed them to github and then fetched and merged them into my laptop. Then, I made some commits on laptop and pushed to github. Took the changes, merged to my desktop (with --no-ff). THEN, happened the probable source of all mischiefs: I reverted the desktop to commit where it was before the latest fetch & merge. Made some development work with it, committed, pushed to github. In the laptop, I did the revert as well, though I reverted it to a commit which was made somewhere between the latest fetch from github, fetched again and merged those. Some error messages came after reverting desktop and laptop both, but things worked still fairly well and I kept working on both machines.
Until now. I tried to push from my laptop to github, which gives the following output:
Counting objects: 106, done.
error: unable to find 5a2a4ac...
error: unable to find bc36923...
error: unable to find ecb0d86...
error: unable to find f76d194...
error: unable to find f899df7...
Compressing objects: 100% (64/64), done.
fatal: failed to read object 5a2a4ac... : Invalid argument
error: failed to push some refs to 'git#github:username/repo.git'
So, the question is, what exactly took place here?
EDIT: It seems that because of suspending my laptop and moving it from place to place in that state screwed up the hard drive somehow. The fsck output is unavailable because we worked around the problem and kept on working, but IIRC some branches and commits were dangling, including that commit which git failed to read. - Teemu
I have run into these kinds of issues.
Rather than spending hours trying to resolve and fix these issues, my 'solution' is usually to take the code I want, copy it into a new directory, delete the .git files and then create a new github for it and then connect the two as usual.
Although this may not be a specific answer to the details you raise, I find that there can be a number of ways that git/github issues can happen and rather than wishing I was a 'git expert' now (it's happening but it takes time), I do the above and continue with my actual application development.
The problem you have is that you are trying to read objects that are not part of your 'tree'. They exist but they have been orphaned. However, git allows you to merge one project to another so this is one way you can keep your commits without starting again, something like the following:
git remote add -f somename git://somegitplace.com/user/some.git
git merge -s ours --no-commit somename/master
git read-tree --prefix=ext/somename -u somename/master
git commit -m 'external merge'
git pull -s subtree somename master
Hope that helps. Let me know if not and we can attack it again
I am getting the following error when I try to push my app to heroku. I saw a similar thread on here, but the issues seemed related to OSX. I am running windows 7
$ git push heroku master
Counting objects: 1652, done.
Delta compression using up to 4 threads.
fatal: object 91f5d3ee9e2edcd42e961ed2eb254d5181cbc734 inconsistent object lengt
h (476 vs 8985)
error: pack-objects died with strange error
error: failed to push some refs to 'git#heroku.com:floating-stone-94.git
I'm not sure what this means. I can't find any consistent answers on the internet. I tried re-creating my ssh public key but still the same.
You need to recover the corrupted files.
How to recover Git objects damaged by hard disk failure?