I followed the guide at http://octopress.org/docs/deploying/github/ to the letter, but when I get to the "rake deploy" part, I get this:
## Deploying branch to Github Pages
rm -rf _deploy/index.html
## copying public to _deploy
cp -r public/. _deploy
cd _deploy
## Commiting: Site updated at 2012-08-21 18:04:11 UTC
[master 84293e9] Site updated at 2012-08-21 18:04:11 UTC
61 files changed, 2658 insertions(+), 1 deletion(-)
create mode 100644 assets/jwplayer/glow/controlbar/background.png
create mode 100644 assets/jwplayer/glow/controlbar/blankButton.png
(...etc)
## Pushing generated _deploy website
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
## Github Pages deploy complete
cd -
Any ideas where I went wrong, or how to fix it?
Thanks!
I have just encountered the same problem.
I guess in the following step,you exactly do what the shell prompt tell you do:
chienlung#chienlung:~/octopress$ rake setup_github_pages
Enter the read/write url for your repository
(For example, 'git#github.com:your_username/your_username.github.com)
Repository url: git#github.com:Chienlung/chienlung.github.com
The shell promt about the repo url is wrong, if you follow it ,you will encounter the error:
## Pushing generated _deploy website
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
The right “Repository url” should be :git#github.com:Chienlung/chienlung.github.com.git
You should add '.git' at the end.
Try again with that URL, hopefully this helps.
祝你好运!
(Another:before you deploy your octopress, make sure that you have generated your SSH KEY.
About generating SSH Keys,see https://help.github.com/articles/generating-ssh-keys)
I managed to remove this error.
assuming you have installed ruby 1.9.3
Create repo on github as username.github.com
cd your_working_dir
rake install / rake install['theme_name']
rake setup_github_pages
this will ask for repository name. Do not append ".git"
e.g. git#github.com:username/username.github.com is perfectly fine.
Now add your remote repo, check available repo using
git remote -v
octopress git://github.com/imathis/octopress.git (fetch)
octopress git://github.com/imathis/octopress.git (push)
Add your repo
git remote add origin git#github.com:username/username.github.com.git
Rename branch master to source, because github pages publishes only source branch
git branch
* master
git branch -m master source
git branch
* source
time to preview
rake preview
open browser and goto localhost:4000
if all is well then push to github
rake generate
git add .
git commit -m "first blog"
git push origin source
rake deploy
as per your description, I think it's a git connection issue.
Just refer to one of your successfully connected project, go to .git/config and see the value 'url' key.
I got the same issue while I tried the formal steps with octopress, it generated wrong url, so I updated it to
url = ssh://git#github.com/AndyEverLie/andyeverlie.github.com.git
in [remote "origin"] section, then run 'rake deploy', it works!
my env:
git version 1.7.0.4
ruby 1.9.3p194 (2012-04-20) [x86_64-linux]
Wish this helps :)
Make sure you provide the rake task the correct url- the example url has .io trailing but the github pages url will likely have .com instead.
I also found that the rake task generates a .git/config where the remote origin branch url ends with .io, which should be changed to .com.git to allow you to push up your source code on the 'source' branch the rake task creates.
Related
I am trying to update submodules in a repo. I have successfully cloned the repo and used git checkout to successfully switch to the correct branch I need to be on. When I run git submodule update --init -–recursive in that branch I get the following:
error: pathspec '–-recursive' did not match any file(s) known to git.
I have previously followed this process on a Macbook pro and did not get an error, but am currently getting the error on Windows. I have the latest version of Git installed (2.32.0). I first considered that this could be a Github SSH key issue, but I have confirmed that it asks for my SSH passphrase and proceeds with the cloning to my local machine, so probably not security related. The Git documentation states that this submodule update is mostly foolproof, so I'm unsure where to go from here. I've also tried running git submodule foreach git pull origin master before the submodule update
and same error. Any assistance is appreciated.
pathspec '–-recursive' means it interprets what should be an option as a filename/filepath instead.
Double-check your '-' (in case they are 'minus' instead of the regular 'hyphen-minus')
Make sure you are using the latest Git for Windows (2.33.0 from today)
When I publish Angular projects I usually always do the same thing.. but for some reason it doesn't work.
That's exactly what I wrote: (The repo name is movies)
git init
git remote add origin <MyGitHubLink>
git add *
git commit -m 'first-commit'
git push -u origin master
ng build --prod --base-href https://itayperry.github.io/movies (from ghpages on github settings)
ngh --dir dist/movies
Then I get the message *** Successfully published! but all I see is the README file.
Please help me!!
The repository: https://github.com/itayperry/movies
The published page: https://itayperry.github.io/movies/
I forgot to go to the settings page and change to GitHub-Pages branch.
Problem solved :)
This is the online reference I am using. However when I enter the remote repository and hit publish I get an error
You cannot publish local branch master to the remote repository origin
because a branch with the same name already exists there. You might
want to rename your local branch and try again.
I dont want to rename anything as yet. I want the first version of the code to go into the master branch and at the same time create an upstream tracking branch locally.
Then I tried using the command line only. After creating a fresh repository, I ran the following commands
$ cd (project-directory)
$ git init
$ (add some files)
$ git add .
$ git commit -m 'Initial commit'
$ git remote add origin <url>
$ git push --force
This worked but now I have all my obj,bin,packages directories along with it. I don't want all those directories to go. Editing the git ignore did not help either. What I am doing wrong? Its taken more twice the amount of time to get the code into the repository than it has taken to write the code!
I only want my sources in the repository and have a tracking local branch to begin with.
I'm trying to fork Michael Hartl's sample_app_rails_4 (https://github.com/railstutorial/sample_app_rails_4). I keep getting the error message:
'fatal: Could not read from remote repository.Please make sure you
have the correct access rights and the repository exists'
after entering the following commands.
$ cd /tmp
$ git clone git#github.com:railstutorial/sample_app_rails_4.git
I appreciate any help in getting this (seemingly simple) step to work.
It looks like SSH is not an option on that repository. Try
git clone https://github.com/railstutorial/sample_app_rails_4.git
Not actually forking, but that worked for me.
You need to fork the repo, get it in your personal GitHub repository, and then clone the version that is in your personal repo. Here is a GitHub article on forking and cloning: https://help.github.com/articles/fork-a-repo
Here are the steps at a high level:
Go to Hartl's repo and click fork. This will copy the project in your GitHub account.
Clone the repo from your personal account:
$ git clone git#github.com:your_github_usernamesample_app_rails_4.git
I'm trying to create a static site using Middleman. The git repo master has the source files. The static files are generated in the build folder which is in .gitignore. I have a branch gh-pages for Github pages. How do I setup things such that the gh-pages has contents of the build folder of master.
Thanks.
Looks like this gem provides an elegant solution:
middleman-gh-pages
I've started using the same technique as Octopress uses, it works great for Middleman.
Basically I use two git repositories, one inside the root folder and one inside the build folder. The root repository pushes to the develop branch on the GitHub remote and excludes the build directory. The repository inside the build directory pushes to the master (or gh-pages) branch of the same GitHub remote.
To automate the pushing of the new static pages, I use the following Rakefile:
desc "deploy build directory to github pages"
task :deploy do
puts "## Deploying branch to Github Pages "
cp_r ".nojekyll", "build/.nojekyll"
cd "build" do
system "git add ."
system "git add -u"
puts "\n## Commiting: Site updated at #{Time.now.utc}"
message = "Site updated at #{Time.now.utc}"
system "git commit -m \"#{message}\""
puts "\n## Pushing generated website"
system "git push origin master"
puts "\n## Github Pages deploy complete"
end
end
Another good gem is middleman-deploy. After you have installed it and configured everything, you can simply run
$ middleman deploy
and your build directory will be pushed to GitHub pages. You can specify which branch you push to in the config. I also have a blog post here regarding switching from Jekyll to GitHub pages and it talks a little about deployment.
I couldn't find a clean way of doing this. This is a script I've been using:
bundle exec middleman build
mv build /tmp/
git checkout gh-pages
git rm -rf .
cp -r /tmp/build/* .
git add .
git commit -m "Update site"
rm -rf /tmp/build
git push
git checkout master