Error when publishing
frechg opened this issue · 19 comments
Working from the master branch I commit my changes and push to master.
I then run the rake build
command which finishes successfully.
I then run rake publish
and get the following error:
...
git push origin gh-pages
error: src refspec gh-pages does not match any.
error: failed to push some refs to 'git@github.com:frechg/portfolio_2014.git'
rake aborted!
Command failed with status (1): [git push origin gh-pages...]
/Users/galenfrechette/.rvm/gems/ruby-2.1.0/gems/middleman-gh-pages-0.0.3/lib/middleman-gh-pages/tasks/gh-pages.rake:81:in `block (2 levels) in <top (required)>'
/Users/galenfrechette/.rvm/gems/ruby-2.1.0/gems/middleman-gh-pages-0.0.3/lib/middleman-gh-pages/tasks/gh-pages.rake:74:in `block in <top (required)>'
Tasks: TOP => publish
(See full trace by running task with --trace)
I've been sufferring the same until i got rid of the files of which contain spaces. Therefore my guess is the error is caused by missing braces around filenames somewhere.
I get the same error, any idea what causes this?
Me too. This is obviously a fatal issue.
Hello
I have the same issue when i try to deploy from an ubuntu machine.
No problem when i am at work on a macOS system.
Have to try to force the deploy with bundle exec rake publish ALLOW_DIRTY=true
Also having the same issues with rake publish
:
git push origin gh-pages
error: src refspec gh-pages does not match any.
Hey everyone, I'm sorry I haven't been helpful here. I actually haven't had an active Middleman project in a couple years. Unfortunately, this means that as of now this project is essentially abandoned. If anyone is willing to take the reigns, I'd love to see it live on and get the attention it deserves.
Workaround: delete the build
subdirectory, and then rake publish
.
The problem here is that if you run rake build
(to test your site), then the "build" subdirectory won't be correctly set up as a clone of the gh-pages
branch.
+1. Just upgraded my system and I'm hitting the same issue.
@flavorjones Tried that, since this is mostly how I was solving problems with deployment. But this time it didn't work. I think something got messed up during deployment.
For information it comes from middleman-build
removing the .git
folder, or at least re-initializing it. I don't have a workaround yet though 😞
Ran into this issue as well. Ended up writing a custom rake task but would be curious if anyone gets this working again.
@simonc Are you referring to the .git
folder in the build
directory or the root directory? Might be able to store it off temporarily then move it back so middleman-build
doesn't futz with it.
@bjankord The .git in the build directory. I ended up moving to middleman-deploy that supports gh-pages :)
@simonc Ah ok. I started looking at middleman-gh-pages because I ran into a github pages deploy issue with middleman-deploy. I got the idea of moving the .git
directory out of the build
directory and running middleman build
and then moving it back from @rpbaptist's comment over here. Curious if you ever got your site to deploy to github pages.
I just submitted a pull-request (#32) that fixes this issue. I used to have collaborator access before this project moved from @neo to @edgecase, but no longer 😢.
/cc @adamlogic I'm glad to get this merged and also look at other currently open issues and pull-requests if it helps. I can also coordinate new rubygems releases if you want to add me there too (same email address as listed on my github profile).
@adamlogic Thanks. It does look like you're currently the only one with rubygems publish access though. Just FYI. Might want to open that up a bit too. https://rubygems.org/gems/middleman-gh-pages
Might want to open that up a bit too.
Done.