When using docpad deploy-ghpages --env static I get the following error:
info: Contribute: http://docpad.org/docs/contribute
info: Plugins: eco, ghpages, livereload, marked, partials
info: Environment: static
info: Deployment to GitHub Pages starting...
info: Generating...
info: Generated 16/18 files in 1.229 seconds
error: Something went wrong with the action
error: An error occured:
Error: exited with a non-zero status code
at ChildProcess.<anonymous> (/home/~NAME~/Documents/websites/test-site-2/node_modules/docpad-plugin-ghpages/node_modules/safeps/out/lib/safeps.js:165:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Socket.<anonymous> (child_process.js:968:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
I've tried making new sites from templates (Bootstrap and Boilerplate) and just deploying those, but I still get the same error.
I have feeling it has something to do with not finding my github repo? Is there a place to check this or input it manually? I have git installed and I set it up to my github.
Tried reinstalling node.js and npm along with docpad with no success.
This may be obvious, but when I had problems like in your description, the issue was that I didn't have the origin set correctly. Try:
git remote -v
and if you aren't seeing your github repo, then
git remote add origin git://github.com/USER/PROJECT.git
Also, another one that can be problematic is getting your ssh keys set-up correctly, so if you have problems beyond this, then check that. Lastly, make sure to set the repository fields correctly in your package.json file (type and url), e.g. (depending on ssh vs https access)
"repository": {
"type": "https",
"url": "git#github.com/NAME.git"
The ghpages plugin uses the git remote config for the source and publishing. It's a clever trick that is not immediately visible to the users. There is no proper error messages either.
check remote repo for publishing
I have blog.git repo for the source, and knoguchi.github.io.git repo for the published pages.
The github.io repo is added to the blog.git repo as a remote repo. I named it pages but it could be anything you like.
Run git remote -v to check the setup. Here is mine. Notice the origin and pages. origin is the usual stuff for the blog.git repo. pages point the github.io repo.
$ git remote -v
origin https://github.com/knoguchi/blog.git (fetch)
origin https://github.com/knoguchi/blog.git (push)
pages https://github.com/knoguchi/knoguchi.github.io.git (fetch)
pages https://github.com/knoguchi/knoguchi.github.io.git (push)
If you don't see your github.io repo there add it. Notice the pages. If you pick other name you will have to set it here.
git remote add pages https://github.com/knoguchi/knoguchi.github.io.git
configure ghpages plugin
Now check docpad.coffee configuration file at the root directory of blog.git. The ghpages plugin requires two lines of configuration. Here is my docpad.coffee. Notice the deployRemote value is pages which matches with the git remote config.
docpadConfig = {
plugins:
ghpages:
deployBranch: 'master'
deployRemote: 'pages'
}
module.exports = docpadConfig
Related
I am trying to set up to build my first website and have been following an online tutorial. When trying to link visual studio and my GitHub repository, this is the message I get:
`
samanthacanela#samanthas-air Canela Street Art % git commit -m "initialized git repository"
[main 3a08e0a] initialized git repository
2 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 about.html
rename homepage.html => home.html (100%)
samanthacanela#samanthas-air Canela Street Art % git push
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin main
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
samanthacanela#samanthas-air Canela Street Art % git push --set-upstream origin main
The authenticity of host 'github.com (140.82.112.3)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
samanthacanela#samanthas-air Canela Street Art %
`
I'm an absolute beginner. What the hell am I doing wrong?
I was following along a tutorial and they lost me.
Based on my understanding, I can see that you may haven't setup the origin remote URI. To fix that issue, you'll need to follow these steps.
Logging into git (If you aren't already)
Run these commands to set your display name and email when pushing:-
$ git config --global user.name "Your name here"
$ git config --global user.email "your_email#example.com"
Using HTTPS access method (recommended)
Using GitHub CLI, you can run $ git auth login and follow the steps to login.
Or if you're using GCM (Git Credential Manager)* refer to this article by GitHub
* GCM is another way to store your credentials securely and connect to GitHub over HTTPS. With GCM, you don't have to manually create and store a personal access token, as GCM manages authentication on your behalf, including 2FA (two-factor authentication).
Using SSH access method
If you clone with SSH, you must generate SSH keys on each computer you use to push or pull from GitHub. For more information, see "Generating a new SSH key."
Setting up your repository
** Make sure to run these commands inside your git environment and not globally.
#Set a new remote
git remote add origin github.com/example/example.git
#Verify new remote
git remote -v
Basically, a common cause for an error after following these steps is cloning using HTTPS method instead of SSH. You can correct this by going to your repository, clicking "Clone or download", then clicking the "Use SSH" button above the URL field and updating the URL of your origin remote like this:
$ git remote set-url origin git#github.com:ex-user/example.git
And that forces the source to be SSH.
If this still gives you an error, please refer to this answer.
For more help, refer to this document.
I am getting the following issue when attempting to commit on github desktop to github:
error: cannot spawn null: No such file or directory
error: gpg failed to sign the data
fatal: failed to write commit object
Originally I was getting just a fatal error based on the cannot spawn null, but then I ran
git config --global commit.gpgsign tru
to get the current error.
I tried deleting and then re-cloning the repo and even individually deleting every file in the repo that I can without making github desktop no longer register the directory as a repo, to no avail. I have no idea how to resolve this at this point or what would even be causing the issue. Ideas?
Note: the issue is located to this single repo, all my other repos are working fine.
Edit:
Results of:
git config --local -l
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
submodule.active=.
remote.origin.url=https://github.com/***{this information is correct}***.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
commit.gpgsign=true
I want to configure the GoLang GB compiler for the projects in my local. based on the documentation given in the url I am trying to get the gb compiler using the command
its returning status code 128. I am unable to understand whats happening here as there is no reference to resolve this issue.
adding GIT_CURL_VERBOSE=1 or 2 is not helping as its not giving any other valuable details as output.
$ GIT_CURL_VERBOSE=1 go get -u -v github.com/constabulary/gb/...
$ github.com/constabulary/gb (download)
$ # cd .; git clone https://github.com/constabulary/gb
C:\work\GitHub\GoLib\src\github.com\constabulary\gb
Cloning into 'C:\work\GitHub\GoLib\src\github.com\constabulary\gb'...
package github.com/constabulary/gb/...: exit status 128
Still getting the avove output
below is the output when not using -u
$ GIT_TRACE=2 go get -v github.com/constabulary/gb/...
github.com/constabulary/gb (download)
# cd .; git clone https://github.com/constabulary/gb
C:\work\GitHub\GoLib\src\github.com\constabulary\gb
17:20:25.818538 git.c:328 trace: built-in: git 'clone'
'https://github.com/constabulary/gb' 'C:\work\GitHub\GoLib\
src\github.com\constabulary\gb'
17:20:25.867542 run-command.c:626 trace: run_command: 'remote-https'
'origin' 'https://github.com/constabulary/gb'
Cloning into 'C:\work\GitHub\GoLib\src\github.com\constabulary\gb'...
17:20:25.970553 git.c:560 trace: exec: 'git-remote-https'
'origin' 'https://github.com/constabulary/gb'
17:20:25.970553 run-command.c:626 trace: run_command: 'git-remote-
https' 'origin' 'https://github.com/constabulary/gb'
package github.com/constabulary/gb/...: exit status 128
I tried to resolve the issue for a couple of days.
In My configuration I was on organizational GitHub and the codelibrary I was trying to get was from github.com. So I thought that might be causing the issue. But that was not true.
I suspected that there is something wrong with the git configuration. as even Organizational github account was not accessible. I tried a lot of solutions from multiple threads.. nothing worked.
Then I ultimately uninstalled GitHub and tortoise git from My machine and installed it again.
and did the complete git configuration setup on my machine from scratch.
It Worked.
What caused that issue in the first place was identified when I went to uninstall git. Installation date was the date when the issue started. So i suspect that there was some faulty update installed for git unknowingly and that caused this issue.
I am having issues with adding an existing project through Github using terminal. I used the following commands:
In Terminal, add the URL for the remote repository where your local repository will be pushed.
# Sets the new remote
git remote add origin remote repository URL
# Verifies the new remote URL
git remote -v
Push the changes in your local repository to GitHub.
# Pushes the changes in your local repository up to the remote repository
# you specified as the origin
git push origin master
It came with the following results:
remote: Permission to Bloc/bloc-jams-student-skeleton.git denied to ynoorstani.
fatal: unable to access 'https://github.com/Bloc/bloc-jams-student-skeleton.git/': The requested URL returned error: 403
Any helpful tips or insight would be awesome!
You could write to this repo (push) only if you were part of the Bloc organization members (here is the list).
Since you are not in that list, you would need to fork that repo in order to push to it.
I am using HgEclipse from here: http://www.javaforge.com/project/HGE
I have created a new repository on my server to test the plugin. I cloned the repository, added some files, committed and attempted to push but received the following error message...
abort: HTTP Error 500: Internal Server Error. Command line:
/home/james/workspace/project:hg -y push http://***#[repository location],
error code: 255
From some Googling I can find that the 255 error is to do with Authentication, but the password is correct, otherwise I wouldn't be able to clone in the first place.
Any help or suggestions would be much appreciated.
Thanks
EDIT:
After updating my system to the latest versions I am now also getting this from the command line when pushing (which was previously working):
abort: HTTP Error 500: Permission denied: .hg/store/data/path-to-file.i
Your webserver can't write into the repository. You can either
change the permissions in the local repo so that the webserver get write permissions there (which means you need to set up write permissions with chmod for all files and directories under (and including) .hg, also you need to set the sticky-bit to all directories)
give the webserver an own repo, which is owned by the server.
Giving the web serve a repo of its own looks like this:
$ sudo bash
# mkdir /srv/repo-base
# chown www-data /srv/repo-base
# cd /srv/repo-base
# su -c "hg clone /path/to/current/repo web-repo-name" www-data
# vi /etc/apache2/sites-available/$SITE_CONFIG_FILE # change the repo path to /srv/repo-base/web-repo-name
# /etc/init.d/apache2 reload
A drawback of this method is that you need to push via http even on the machine with the webserver, since as a normal user you don't have write permissions to the webserver repo.
This answered it for me, although it's a different system set-up: TortoiseHg.
In the Repository Settings -> Server, I set Allow Push to *
This was on a private network so secured behind a firewall.