git svn clone failed with couldn't truncate file at - windows

Tried to clone my SVN repository with:
git svn clone URL -T trunk -b branches -t tags
and got this weird error:
couldn't truncate file at /usr/lib/perl5/site_perl/Git.pm line 1322.
How can I solve this?
Thx!

Tried it again with gitbash instead of windows terminal -> all OK!

Related

How to deal: not a git repository: '/home/user/git' even if it is

Some time ago i created a 'git' directory in a home path, just to store repos i use. But this somehow broke all my git system and even in ~ folder, when i was trying to use git, i was outputting me this (PWD=/home/user):
$ git status
fatal: This operation must be run in a work tree
I've removed 'git' folder, but appear another problem (PWD=/home/user):
$ git status
fatal: not a git repository: '/home/user/git'
I tried to reinstall git. Not helped. I'm a bit confused about this.
UPD #1:
I'm sorry for bad explanation at the beginning.
This should be clear enough:
$pwd
/home/user/MyGitRepos/some_repo/
$ls -a
. .. .git README.md
$git status
fatal: not a git repository: '/home/user/git'
Any path i am /, /etc, /home/user/ gives me the same output:
fatal: not a git repository: '/home/user/git'
Double-check your environment variables.
If you have GIT_DIR or GIT_WORK_TREE set to /home/user/git, that would explain the error message.
Check also git config -l --show-scope --show-origin in case any configuration would also reference that path.

Unable to change Visual Code repository settings

I searched a lot for solutions for it, tried many ways to reset everything to 0.
I tried to set up visual studio (Windows 10 64 bits) to work with bitbucket without success.
It never accepts my password, even when I reset it.
Tried to delete any folders that would have settings without success either.
Tried to revert it to GitHub with no success either. Deleting the repositories did not improve.
Looking for git in: C:\Program Files\Git\cmd\git.exe
Using git 2.18.0.windows.1 from C:\Program Files\Git\cmd\git.exe
> git rev-parse --show-toplevel
> git config --get commit.template
Open repository: d:\
> git fetch
> git status -z -u
> git check-ignore -z --stdin
Missing or invalid credentials.
Skip fetch commands
Missing or invalid credentials.
Skip fetch commands
remote: Unauthorized
fatal: Authentication failed for 'https://bitbucket.org/gusnd/mem/src/master/'
> git symbolic-ref --short HEAD
> git rev-parse master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
After unistalling git things worked fine but, if I reinstall it, I get the same issue.
Any ideas?
ok, I found a hidden .git folder on D: drive root... and other files on program data, seems to be fixed

'git pull' on Windows7 frozen process 'git-am.exe'

when I need a pull for remote repo, the command 'git pull' dosen't work.
Only create a processe 'git-am.exe' but nothing happens
On Win7 whit git:
$ git version
git version 2.8.0.windows.1
Could you check if you have any remote set in your git? by git remote -v if not, do set remote in order to get pull request.

Gitolite on Windows - cloning stuck

I have installed gitolite on windows server using cygwin, installation steps went without problems and when I try to "ssh gitadmin#gitserver info" from local machine(windows) I get the correct response:
hello gitoliteAdmin, this is gitadmin#VRGWLSDEV1T running gitolite3 v3.6.1-6-gdc
8b590 on git 1.9.4.msysgit.0
R W gitolite-admin
R W testing
If I try to clone using Git Bash I get error:
$ git clone gitadmin#gitserver:gitolite-admin
Cloning into 'gitolite-admin'...
git: 'shell' is not a git command. See 'git --help'.
Did you mean this?
help
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If I try to clone using cygwin terminal on local mashine (using the same ssh key and I get the same valid gitolite message) it returns:
$ git clone gitadmin#gitserver:gitolite-admin.git
Cloning into 'gitolite-admin'...
...and stays like that for enternity!
I have searched for multiple solutions, added PATH (with Git etc.) to .bashrc and .bash_profile files on gitolite designated server. Also added PATH to .gitolite.rc to include custom Git installation path (before that I did not recieve the gitolite message)
If you have any solution or idea what did I do wrong: please....HELP.
Resolved it by myself:
Mysis Git installation was confusing Cygwin. Added Git pack to Cygwin and removed Msys Git env. variables: everything woks perfectly now.

Setup a git bare repo on a windows apache server

I need help in setting up a bare git repo on an apache web server. I followed the below instructions
$ cd /var/www/htdocs/
$ git clone --bare /path/to/git_project gitproject.git
$ cd gitproject.git
$ mv hooks/post-update.sample hooks/post-update
$ chmod a+x hooks/post-update
I got these instructions from here
http://git-scm.com/book/en/Git-on-the-Server-The-Protocols.
I try to run
git clone "http://ip-addr/gitproject.git"
, but am not successful and neither the push command works. Do you have any suggestions on what to do next.
At least try it without the double-quotes:
git clone http://ip-addr/gitproject.git
And if it still hangs, check the log of your Apache server, to see if it is contacted at all.

Resources