Git Unable to Commit - github

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

Related

fatal: unsafe repository is owned by someone else - GitHub actions workflow

I have two yml files configured in the GitHub actions. When new code is pushed to master, one yml file deploys the files to specific website folder, and the other one to another website folder.
Even though both websites are on the same server, one of the deploy.yml files is not executing jobs and it's throwing this error.
fatal: unsafe repository ('/var/www/yayyy.net/public_html' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /var/www/yyyy.net/public_html
Error: Process completed with exit code 128.
at this step:
- name: Add temp repo access
run: |
cd $DEV_WEBSITE_PATH
git remote set-url origin https://anything:${{ secrets.GITHUB_TOKEN }}#github.com/yyyyy/website.git
I tried adding extra step before that step and added this safe.directory command but then it's showing permission denied error.
error: could not lock config file /var/www/.gitconfig: Permission denied
Adding sudo before the command then throws this error:
sudo: sorry, you must have a tty to run sudo
I'm confused what I'm missing, can you help?
The.gitconfig did not exist and the username didn't have permission to create it. So, I created it manually and changed ownership to the username.

exit status 128 while cloning the git repository while getting go package from Github location

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.

Can't deploy docpad to github using ghpages plugin

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

Jenkins/Github: Apparently .git/config doesn't exist?

So after installing the Github plugin to Jenkins CI and attempting to add a job for my Github project to compile automatically after a Github push to master, Jenkins reports that .git/config doesn't exist.
I went to /var/lib/jenkins and created .git and the config file and chowned them to jenkins:nogroup.
The error persisted. I then went and did this in my own VPS home directory. Error persists.
I then made a home folder for the jenkins user with no shell and did the same steps. Error persists.
Which .git/config is it referring to?!
Edit:
The actual error I'm referring to is:
Failed to connect to repository : Command "git config --local credential.helper store --file=\"/tmp/git7406572387997126825.credentials\"" returned status code 255:
stdout:
stderr: error: could not lock config file .git/config: No such file or directory
Solved...switched to SSH.
Steps:
Assume control of Jenkins user. su jenkins
(You may need to set a password for it first (make it good!) sudo passwd jenkins.
Go home: cd ~.
Generate key: ssh keygen -t rsa -C "email". (No passcode)
Copy $JENKINS_HOME/.ssh/id_rsa.pub to Github.
Set Jenkins credentials to authenticate to Github using the private key.
Works fine.
Found a neat workaround here: https://groups.google.com/forum/#!topic/git-users/pyv6ldFxUio
mkdir ~/.git
git config --global user.email "m...#school.com"
https://groups.google.com/forum/#!topic/git-users/pyv6ldFxUio

Difficulty cloning individuality file from github repository

I'm trying to pull an individual file from a private github repository of mine, and am having difficulties.
Specifically, this works:
git clone git#github.com:userName/repositoryName.git
but I can't seem to find any documentation in how to clone/get a single file. I've tried a few variations:
git clone git#github.com/userName/repositoryName/blob/master/example.py
git clone git#github.com/userName/repositroyName.git/example.py
Each time I get prompted for my password:
Cloning into 'example.py'...
Enter passphrase for key '/home/root/.ssh/id_rsa':
Except upon entering my valid password, I get:
ERROR: Repositroy not found.
fatal: The remote end hung up unexpectedly
Not sure what to do at this point, I'm running Angstrom Linux 3.2.28