Deploying blog with Octopress on github - github

What i'm doing:
I have been trying to deploy an Octopress Blog using github as host and jekyll and liquid for designing purpose.
I have installed all necessary file like gitBash for windows , Jekyll , Octopress ,RubyGem and even DevKit. I can see my blog preview using 'rake preview' and its coming completely fine as it should. Also 'rake generate' and 'rake deploy' worked fine on gitBash and gave me a positive reply.
Am unclear with 3 things:
Do i have to copy my _deploy folder to github repository.
Getting 2 error on GitBash:
1.Change machine code to 65001(For which i have used chcp 65001 on cmd)
2.Permission Denied on public key when using rake deploy command.
Also i see a ruby gem error sometimes like Polling for changes and then i have to use ctrl+C to get out of terminal
I can give you many links for tutorials too but if there's any one who can help me practically socially;p then it will be real help.
Also when am on my source folder from gitbash i typed git push -u origin master am getting following two errors.

Related

how to do "git clone" on VS code

Today, I am following this video https://www.youtube.com/watch?v=RGOj5yH7evk to learn how to use GitHub, but I am using Windows.
I've set it all successfully by also following the official instruction (https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) and it works on Git Bash.
enter image description here
But I failed when I tried to "git clone" in Visual Studio Code and got this response:
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
I've also tried setting the config because the video mentioned config (although the official instructions does't mention this, which means Windows users don't need to care about this. But this was what I tried to solve the problem, just in case this could make influence on my problem)
file:C:/Users/CC2022/.gitconfig user.name=CC
file:C:/Users/CC2022/.gitconfig user.email=username#email.com
file:C:/Users/CC2022/.gitconfig core.editor='C:\Users\CC2022\AppData\Local\Programs\Microsoft VS Code/Code.exe' -multiInst -notabbar -nosession -noPlugin
So, is there any requirement for the folder I select to open in VS code to do the git stuff or where is the problem?
Thank you for your help
I can git clone by the HTTP link on both VS code and GitBash, or git clone by the SSH link on Git Bash.
But I have a problem (git clone by SSH link) on VS Code.
In addition, although git clone by HTTP link on VS Code is okay, but I cannot "push" edited files back to GitHub, because the access is denied
That means the repository you are trying to push back to is not one you own/have created. You might therefore have no right to contribute back to it directly.

Vuepress not displaying documents correctly

I updated a pre-existing vuepress documentation, which runs and works as expected when delopyed on localhost:8080/, however once I push the updates to gh hub pages it does not display correctly.
code i use to deploy:
set -e
npm run docs:build
cd docs/.vuepress/dist
git init
git add -A
git commit -m "Deploy documentation"
git push-f git#github.com:NAME/REPO.git master:gh-pages
I have no error messages durning run time or deploy.
But when I check the actual documentation on github, it displays funny. and the links do not work.... as when I check the pages dev eniroment on the console 404 errors appear... it seems that there might be something wrong with the dist.js files in assets....
Not sure how to fix this...please help. Thx!
Images 1: Displays black blocks
Images 2 Error in the dev console
(I have no errors messages durning build only in the console)
I think you may want to double-check if you have set the base correctly.
Check out the documentation site about deploy to GitHub pages and Config Reference -> base
If this doesn't solve your problem, can you post more detail about your code? Or maybe a repo?

Can't commit with Github Windows, no reason given

I have been forced to use other apps, and the command line since Github for Windows is not allowing me to commit changes. I would like to understand what's the problem, but I simply get a prompt with this message:
Commit failed
Failed to create new commit
Then, it gives me the option of go to the Git Shell or to cancel. While I am not an expert with the terminal, I am able to make commits when I choose to go to the Git Shell (or to any other application for that matter).
I am using Github 2.0.5 on Windows 7.
After an exchange with the Github for Windows developers, the issue has something to do with Windows inability to work with paths when they're too long. The node_modules folders generated by Node.js is the culprit of this issue in my particular case.
However, the node_modules folders in my repository are gitignored. The fact that even when gitignored they create a problem in Github for Windows means the developers have to address the situation.
I expect a response or a patch from the developers soon. They have been very helpful. In the meantime, I am using SourceTree as my Windows Git GUI.

Can't connect to Github private repo with eclipse

I don't seem to be able to connect to a Github private repo with Eclipse.
I am able to connect to the repo through the command line on windows by using mysysgit with putty (Pageant), without the need to provide login/password. Is use this article and it works LINKE.
Eclipse does recognize my git repo, but when I right click and pull/push, nothing really happens: it's says it's pulling 0% in the eclipse status bar, but it doesn't change...
I have added the ssh private/pub key to the eclipse pref I followed the helpful links in this post, but not having a lot of luck.
When adding the github repo through the import and searching, I do get the error shown in the screenshot :
And when I add the private repo through the Eclipse import uri, I get also an error, see screenshot (using git protocol):
I also tried the https protocol, but then get the following error:
I tried many things as you can find these errors with Google, but didn't manage to solve it :(
I am using putty Pageant, and that works on the command line. But in the github help I read that github doesn't work with Putty, but in my case it does :(...
Any idea how to solve this?
EDITED:
I just noticed that a pull request does work, but it take like 10 min to end, while it costs 10s on the command line. Any idea?
Regarding ssh, you would need to configure Egit in order to show where your pubic/private keys are: Eclipse SSH Configuration
If you are using plink/pagent keys (instead of openssh ones), see "Using putty's pagent with egit in Eclipse".
Regarding https, many causes can prevent to access a remote repo: anti-virus, JVM, certificates issue, ...

Jekyll not processing plugins on server

Jekyll is processing my _plugins folder fine on my local machine (OS X 10.7.4, ruby 1.9.3), but it's not processing them on the server (Ubuntu 12.04, ruby 1.9.3). Both have the same version of Jekyll installed (0.11.2).
I'm trying to use the generate_sitemap plugin, here.
I'm deploying via git and the post-receive hook, which looks like this:
#!/bin/bash -l
GIT_REPO=/my_repo.git
TMP_GIT_CLONE=/my_temp_folder/
PUBLIC_WWW=/my_public_folder/
git clone $GIT_REPO $TMP_GIT_CLONE
jekyll --no-auto $TMP_GIT_CLONE $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
I am seeing this error when I deploy:
remote: /home/ed/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
But, from what I've read, that's a Maruku warning and has nothing to do with the plugins.
Anybody have any ideas about what I can try to figure this out? I'm at a bit of a loss.
It's very hard to debug with Jekyll, but it's a great tool !!!
I assume you have more than one plugin in your _plugins folder.
So maybe one or some of your plugins , cause the problem.
If I'm right, you can do the following :
Kill your Jekyll
Create a backup of your plugins in another location (not in _plugins
folder).
Leave just one plugin in your _plugins folder and start Jekyll.
If it works , copy another plugin to the _plugins folder, until you
find the one which fails the Jekyll.
When you find it, you can add debug printouts to the problematic plugin (that's what I did).
Something like :
puts "before .... "
I have built the http://www.cloudifysource.org/ only with Jekyll and you can find and use lots of our useful examples in our GitHub repo : https://github.com/CloudifySource/cloudifysource.github.com
I had the same problem with Jekyll not loading plugins when called from the post-receive hook.
As is mentioned in the comments above, changing the current working directory to $TMP_GIT_CLONE does the trick.
You don't have to change anything in _config.yml.
#!/bin/bash -l
GIT_REPO=/my_repo.git
TMP_GIT_CLONE=/my_temp_folder/
PUBLIC_WWW=/my_public_folder/
git clone $GIT_REPO $TMP_GIT_CLONE
cd $TMP_GIT_CLONE # move to the temp dir
jekyll --no-auto $TMP_GIT_CLONE $PUBLIC_WWW
cd # move back to allow deletion
rm -Rf $TMP_GIT_CLONE
exit
This is a real head-scratcher seeing as executing the original post-receive hook manually as the git user works just fine... Anyway, Jekyll is now loading plugins on my server and hopefully making this a proper answer will help others to find this solution.
Lately, I start to build https://github.com/alswl/code-standards-jekyll with jekyll.
I write two plugins in _plugins, and I found it was hard to debug.
At first, I use puts "balabala" to debug, it seems work.But once I met problem that didn't generate anything in the _site folder, and there was no 'balabala' in the console, I was panic.
After I read the jekyll source, I try to set auto=false in _config.yml, running jekyll will produce some debug trace stack error. Thank godness.
So, ues auto=false will help you to debug plugins.