error 127 when running "git svn init" on cygwin - cygwin

I'm trying to convert a local SVN repository to git using git-svn under cygwin and failing. This is what happens:
$ git svn init -t tags -b branches -T trunk file:///cygdrive/e/repository/project
init: command returned error: 127
Any ideas?

I installed msysgit and it failed as well, but with a much better error message (Expected FS format '2'; found format '4') which turned up helpful discussions on Google. It seems like git-svn can't handle the local filesystem format of a current TortoiseSVN. The solution is to run svnserve and use the svn: protocol via localhost.

Related

Resolving Errors With Git Index Too Small

I recently updated the development server that hosts our code repos to a newer version of Ubuntu (18.04). As part of the process git was upgraded to version 2.23.0. The actual application servers where the code gets deployed to need to be able to checkout the latest changes from the git repos. When I try to do a 'git fetch' on those servers I get a long list of errors that look like this:
error: index file
./objects/pack/._pack-5b58f700fea57ee6f8ff29514a376b945bb1c8a9.idx is
too small
I did some digging around to see if I could come up with a solution but so far noting has worked. I tried the answers listed here: git error: "index file is too small" .
Neither git index-pack nor git repack -a -d solved the issue. I even tried deleting the local copy of the files from the application server and installing fresh using git clone. The clone itself threw a bunch of errors similar to before
remote: error: index file
./objects/pack/._pack-5b58f700fea57ee6f8ff29514a376b945bb1c8a9.idx is
too small
At this point I'm out of ideas. Any help would be appreciated.
Edit: The output of du -h suggests that there is enough disk space.
The error message sounds like file corruption. If you have not run out of disk space, you can delete the index file and recreate it with:
git index-pack -v ./objects/pack/._pack-5b58f700fea57ee6f8ff29514a376b945bb1c8a9.idx
You might also want to run use git-fsck to
verify the connectivity and validity of the objects in the GIT database -- both the remote the local one.
If your index is corrupt, you can also try to reset the branch which will create a new index file:
To be safe, backup .git/index.
Remove the index file .git/index.
Perform git reset
References
The issue is a possible duplicate of git error: "index file is too small"
Documentation on git index-pack can be found at https://git-scm.com/docs/git-index-pack
Some notes on repairing a broken index: https://makandracards.com/makandra/5899-how-to-fix-a-corrupt-git-index
fatal: packfile name 'server' does not end with '.pack'
I encounter this error when transfer my git repo from Mac OS to another system. Files start with '._' are Mac OS meta files generated by tar command. So look at this question to avoid '._*' files: Tar command in mac os x adding "hidden" files, why?

Git did not exit cleanly (exit code 1)

I can't push and I already tried all solution in this question. I'm using Windows10 and TortoiseGit.
I generated my SSH key with PuTTYgen and I already tried to replace the key in case my older was corrupted. When I try with git bash I got this error:
$ git fetch -p Permission denied (public key).
fatal: Could not read from remote repository. Please make sure you
have the correct access rights and the repository exists.
In TortoiseGit I get:
git did not exit cleanly (exit code 1)
For My case i did 3 steps to achieve the sucessful build.
revert all the local changes if any (or just keep a copy of it in case you need it for future use)
Do a git clean up, do a pull and check the logs for error
GO to the git bash option and the error i was getting in log in above stem (i my case )
as "error: cannot lock ref and the branch details", so in the git bash i ran the following command
git update-ref -d 'Branch_name'
For example if the error was something like
**
ISSUE
**error: cannot lock ref 'refs/remotes/origin/EXMPLEISSUE/EXAMPLE-1011_DEMO_web_interface_DOES_NOT_GET_GIT_UPDATE':
Then i ran following command
git update-ref -d 'refs/remotes/origin/EXMPLEISSUE/EXAMPLE-1011_DEMO_web_interface_DOES_NOT_GET_GIT_UPDATE'
We have to ensure all the error in logs to be solved similarly before getting a successful pull by doing git update-ref -d 'Branch_name' and finally i can get the take the successful pull from git.

bash can't find git command: No such file or directory

I've been using git along with a project in order to have version control for quite some time now. But all of a sudden, it stopped working! I noticed that while pushing new changes, because I received this message:
/home/user/bin/git/bin/git: No such file or directory
Also, whereis command is unable to find where the program named git is present:
> whereis git
git:
Any idea on how I can solve this?
It looks like you have a dead link to a local version of git (which you might have removed?) in your $PATH. Try which git or find / -lname /home/user/bin/git/bin/git to spot it.

Pull not working - TortoiseGIT / Windows 7 / GIT on Debian + gitolite

i have a weird issue. Im using TortoiseGIT (Win7) and my repositories are placed on a vritual server (Debian), where im using gitolite and SSH keys.
I can clone the repository to my PC, i can run Fetch, Push, Commit, Sync .. everything, but when trying to Pull the changes from server Pushed by other contributor, the following error appears:
git.exe pull -v --progress "origin"
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?
git did not exit cleanly (exit code 128)
I don't understand, why just the pull command is not working .. thanks for any help.
I can make a clone of the repository, with the contributed changes .. but can not Pull the changes to created repository on my PC.
I encountered this same issue after changing the git Bash executable sh.exe to be always run as administrator (to get round another problem). It then left git unable to access it under certain scenarios and caused various "Maybe git-* is broken?" errors. Perhaps this might help someone...
Uninstalling old Git and reinstalling the latest build fixed this issue for me.
Here's a link to the installers
Link to get installers
My exact error message was
C:\Program Files (x86)\Git/libexec/git-core\git-pull: line 304: exec: git-merge: not found
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?
The error message is very much linked to Git, and comes from help.c:
static const char bad_interpreter_advice[] =
N_("'%s' appears to be a git command, but we were not\n"
"able to execute it. Maybe git-%s is broken?");
That is similar to issue 40 (of another GUI, here terminal-ide).
In that case, it was due to the remote Git installation, which was incomplete
(Comments 3 of issue 19)
git-merge was also missing from install, can be fixed with
$> ln -s git git-merge
in system/bin/
The resolution might not be exactly the same in your case, but it could be related to a faulty Git installation.
I see that you're able to run "git fetch". If you can also run "git merge", running the sequence "git fetch" followed by "git merge" will accomplish the same thing as "git pull".
Source:
http://git-scm.com/docs/git-pull

git autodeploy script within post-receive hook on ubuntu

I have an autodeploy bash script to get updated repo to /tmp in 'post-receive' hook on gitosis
#!/bin/bash
PWD=$PWD
REPO_NAME=${PWD##/*/}
cd /tmp
git clone git#atom-desktop:$REPO_NAME
But anytime when I push repository I got error like this:
Host key verification failed.
fatal: The remote end hung up unexpectedly
error: hooks/post-receive exited with error code 128
How to cope with that ?
You can simply do:
git clone --local $REPO_NAME
As git also supports cloning from local directories:
git-clone
For local respositories, also
supported by git natively, the
following syntaxes may be used:
/path/to/repo.git/
file:///path/to/repo.git/
These two syntaxes are mostly
equivalent, except the former implies
--local option.
Sounds like there is a key mismatch in the SSH connection from wherever /tmp is and atom-desktop. What happens if you try to SSH from the machine that /tmp is located at to atom-desktop?

Resources