Git throws out-of-memory error after logoff from the server - github

I have an issue that I can't seem to be able to solve...
I want to use GutHub to develop a web-app with joomla locally and push my changes to the server everytime I feel like it.
It works great but after I log off the server I get an error that remains, even if I raise the memory limits per config:
fatal: Out of memory, realloc failed
I'm not an expert since I'm still starting to use GitHub, but these are my steps and maybe you have an advice for me...
(on the 1and1.com server)
I start on the server, installing a fresh joomla 3.7.4 and copy the .gitignore from git//joomla/joomla-cms into my webroot-directory, ignoring all core files.
(server)
git init
git config receive.denyCurrentBranch false
cat << EOF >> webrootdir/.git/hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=webrootdir git checkout master -f
EOF
chmod 755 webrootdir/.git/hooks/post-receive
(local computer, cloning into local dir called webroot)
git clone ssh://password#account.1and1-data.host/homepages/11/123456789/htdocs/webroot webroot
(local)
do some work
(local)
git add . && git commit -m "Joomla 3.7.4"
git push
(server)
git checkout -f
I repeat steps 5 and 6 all day long, it works as expected and the files on the server are being updated everytime I repeat the steps.
When I logoff the server or being logged of after some time, the server locks into the error, no matter if I try to checkout or just call git status.
My biggest files are around 250kB (jpegs), I don't manage databases over git, it's just a template folder I'm working on that's being updated, so I can't really figure out what I'm doing wrong :-/
Any advice would be very much appreciated,
Thanks!

I was able to fix the issue with
git config --global core.preloadIndex false

Related

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.

Jenkins Intermittent Hangs on git clone/checkout from github on pipeline jobs

Have you seen and do you have a solution for or investigation ideas for this problem:
jenkins pipeline jobs using Pipeline from GitHub SCM intermittently hang on clone/checkout
nothing reported in jenkins logs about this situation
only seems to happen when we have a lot of activity (usually right before sprint demos)
clears after some period of time - haven't been able to detect much a pattern yet
Checking out git git#github.com:MyTeam/myproject into
/var/lib/jenkins/jobs/myproject-dev-deploy/workspace#script to read deploy/dev-Jenkinsfile
git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
git config remote.origin.url git#github.com:MyTeam/myproject # timeout=10
Fetching upstream changes from git#github.com:MyTeam/myproject
git --version # timeout=10
using GIT_SSH to set credentials Deploy key for myproject
git fetch --tags --progress git#github.com:MyTeam/myproject +refs/heads/:refs/remotes/origin/```
A horrible intermittent problem in a java app? To the JVM settings we go. Luckily CloudBees wrote a great article on this Tuning Jenkins GC For Responsiveness and Stability with Large Instances
Turns out this wasn't the prime factor. The real cause was network configuration and impact of a backup job on saturation. Still, an excellent article.
Here's how we debugged it:
Github support gave us this https://github-debug.com/ script and we augmented it thus
`
#!/usr/bin/env bash
echo Clearing Previous Run
rm -rf /tmp/debug-repo-http
rm -rf /tmp/debug-repo-ssh
echo clone1: `date`
time git clone https://github.com/github/debug-repo /tmp/debug-repo-http
echo clone2: `date`
time git clone git#github.com:github/debug-repo /tmp/debug-repo-ssh
echo Ping: `date`
time ping -c 10 github.com
#echo traceroute: `date`
#traceroute github.com
Setup jenkins job to attempt checkout, fail and report if it took longer than 30s - once via pipeline + plugin and once via shell script
Began running various tests: dump all docker images and re-pull, s3 pull backup, s3 push backup etc.
Repeat tests in another network area and compare results
I had meet this issue by git clone command and it's cost me 2 days to resolved this problems.
If you run git command by windows shell/batch on jenkins, it maybe cause by git ssh key issue...
Jenkins windows shell or batch command will use 'system' account to process git command and its ssh key setting is different form your gerrit plugin or login account.
A. Different git ssh key path
The git ssh key of 'system' account is setting in following path:
C:\Windows\System32\config\systemprofile\.ssh
C:\Windows\SysWOW64\config\systemprofile\.ssh
You can check ssh key in these paths for system account.
B. Register key in know_host file
Jenkins will not auto import new key of known host to your know_host file.
You can do it mannually by following steps:
Login your local account in windows
SSH this git remote path directly ssh <git remote web site> -p <port>, type yes to register the key
Copy the registered key form local account know_host (C:\Users\.ssh) you will see the bottom of file likes:
[gerrit.cartography.com]:29168,[10.25.174.78]:29418 ssh-rsa AAAAB3NzaC1yc2EAASSSSAQABAAAAgQDPHbDKCHL3oPbzDn3qaVZR8S1EZx/rb500Th/fjQYg5jrJ7PBMVVUyNTpJ2moje5hLYjNsVtXtcoNEZjImGul2dl3f+eHrCB27X5198jr8Wj66I/xsQCLEngd7l3velsdfgd3432fsdDiFaE9INjDjgngfNzlFA+CYpFsnaorZ6XSPQ==
Paste to 'system' know_host file.
C:\Windows\System32\config\systemprofile\.ssh
C:\Windows\SysWOW64\config\systemprofile\.ssh
I think you will resolve your problem now !
Enjoy it!

Rubymine :: Git is not working, getting fatal: Could not read from remote repository

Rubymine was working fine. I was able to perform all kind of git related operation using rubymine seamlessly. But suddenly its not working. When I want to pull its says:
fatal: Could not read from remote repository.
It also fails for all other read/write > operation.
But git is working fine in my machine. I mean I can push/pull using command line. But now working with rubymine.
I am using Mac.
First make sure that you can use git from command line. If you can then,
Go to settings -> Version Control -> Git
Select "SSH executable" -> Native
And then restart Rubymine.
Did you init a local git repository, into which this remote is supposed to be added?
Does your local directory have a .git folder?
Try git init...
Step 1 - Attempt adding you public key to Heroku
heroku keys:add ~/.ssh/id_rsa.pub
Step 2 - Generate a new set of SSH keys, then attempt the first step again
https://help.github.com/articles/generating-ssh-keys
Step 3 - Verify and/or modify your config file
vim ~/.ssh/config
Host heroku.com
Hostname heroku.com
Port 22
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa <--- Should be your public SSH key
TCPKeepAlive yes
User jsmith#gmail.com
Step 4 - Remove the heroku remote from git, the recreate the connection
Add the remote via heroku create will only be an option for new repositories. Be sure to delete your old repo that you originally attempted to create
$ git remote rm heroku
$ git heroku create
Step 5: Reinstall Heroku Toolkit
http://hayley.ws/2010/12/04/getting-jekyll-running.html

Receiving Error Code: 255 when pushing to Mercurial repo from Eclipse Plugin

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.

Permission denied on network/samba share while accessing HG repo

I am using EclipsePHP in Ubuntu 10.10 and try to use Mercurial (HG) to work with a repository that's located on my network-connected staging server (samba share).
When trying to refresh the repository from within Eclipse (hg status really) , I get the following error thrown in my face: abort: Operation not permitted: /media/sharename/myrepository/.hg/.dirstate* .
Whilst trying to find out what's wrong, I went to the network share from terminal and wrote hg status - the same error occurs, so it's not only occuring from within Eclipse. I tested to CHMOD the files from both my computer as well as the server - chmod 777 /media/sharename/myrepository/ -R - nothing changes.
But when I accidentally ran sudo hg status from the repo directory, Mercurial started the fireworks and worked like a charm.
What on earth is going wrong with my computer? Why can't i run my hg commands without being root?
You can mount your network drive like this. Open your /etc/fstab/, and then enter the following line.
//IP_OR_HOSTNAME/DIRECTORY_NAME /MOUNT_DIRECTORY cifs user=sambauser,pass=sambapassword,auto,exec,umask=002,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0
Hope it works.
chmod will not help you here I guess. The ownership and permissions on the server side are not replicated to the client (no unix extensions on server) or your UID/GID differ between both machines. You can override file ownership when mounting via:
mount -t cifs //SERVER/SHARE /MOUNTPOINT -o uid=USERNAME
This is from memory though, check man mount.cifs for details. Also, alternative networked filesystems like NFS might serve you better in this case, or try sshfs.