Git failed to check-out code in windows cmd - windows

So I'm trying to do a git clone in windows CMD. But I end-up with following error. I tried every work around. But had no luck.
Cloning into 'tomato-api'...
remote: Counting objects: 67887, done.
remote: Total 17346 (delta 0), reused 0 (delta 0), pack-reused 17346
Receiving objects: 100% (67887/67887), 643.56 MiB | 742.00 KiB/s, done.
Resolving deltas: 100% (7654/7654), done.
fatal: cannot create directory at 'vegitables/market/github.com/docker/distribution/sharing/united-streets/generated_certs.d/localregistry:5440': Invalid argument
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

The git repository you are trying to clone from has a directory with path consisting of the Windows reserved word - colon (:). Therefore, that directory is not able to be created.

Another approach more recently discussed is to:
git clone --no-checkout the repository
delete all files with ':' in their name (same for files with \ in their name)
Using git filter-repo, you can remove them from the full history of the repository.

Related

error: git-credential-osxkeychain died of signal 11 - can't understand answers

I am trying to push a text file to github and am getting the above error. I am using OSX 10.7.5 and git-1.8.4.2.
I have created a text file which I seem to be able to add and commit without problems. On my first attempt, I had the following error message:
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
error: `git-credential-osxkeychain died of signal 11`
Username for `'https://github.com'`: Anto58
Password for `'https://Anto58#github.com'`:
error: `git-credential-osxkeychain` died of signal 11
To `https://github.com/Anto58/datasciencecoursera.git`
! [rejected] master -> master (fetch first)
error: failed to push some refs to `'https://github.com/Anto58/datasciencecoursera.git'`
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I spent some time researching this and found that this was a problem because my github repo had a readme file in it that was not on my local repo and I tried implementing both suggested solutions, cloning and pulling before pushing.
The cloning looked as though it was working:
Cloning into 'coursera-repo'...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity... done
But I still couldn't push. So then I deleted my directory and started again using pull, which gave virtually identical output:
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From `https://github.com/Anto58/datasciencecoursera`
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
But same problem with pushing:
error: `git-credential-osxkeychain` died of signal 11
Username for `'https://github.com'`: Anto58
Password for `'https://Anto58#github.com'`:
error: `git-credential-osxkeychain` died of signal 11
Everything up-to-date
While it said everything was up-to-date, the file did not appear in my github'repo`.
Then I found the link on the stackoverflow question which had the link to the site dealing with caching your github password, which I tried to follow.
I typed
git credential-osxkeychain
which gave me the same error as I started with
I then tried to download the osxkeychain helper using the curl command:
`curl -s -O \
? https://github-media-downloads.s3.amazonaws.com/osx/git-dredential-osxkeychain`
I didn't get an error message for this, so I'm assuming it worked?
The next step was changing the permissions:
chmod u+x git-credential-osxkeychain
which again didn't give an error message
But I fell over at the next step:
sudo mv git-credential-osxkeychain \
"$(dirname $(which git))/git-credential-osxkeychain"`
where I got an illegal variable name message. Is this because dirname should actually be /user/local/git/? And should "which git" also be replaced by something else? I started getting pretty nervous at the point when I got the message:
`WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.`
because I really had no idea what I was doing.
The TA on Coursera suggested just running
git config --global credential.helper osxkeychain
but now I get the error message twice instead of just once and still can't push.
I have also tried to find where my gitconfig file is since one of the suggestions is to delete your gitconfig file but only after checking it doesn't have anything else in it. It didn't show up on a normal search in finder so I assumed it is hidden and used defaults write com.apple.finder AppleShowAllFiles YES but without success. When I use alt Relaunch, Finder keeps opening with the Git package window that doesn't have a search option.
Sorry this is so long - Can anybody help me and explain what I need to do in very simple terms - assume I know nothing?
Also if you can explain why that would be incredibly helpful as I would like to understand how it works.
I am using the same Mac operating system and Git version as you and have been getting the same error messages when trying to push the HelloWorld.md file to my datasciencecoursera repo on Github. I finally got round this by deleting the repo on Github and making it again but without ticking the create README file, so its just a completely empty repository. I then deleted and recreated the directory I'd made on my local computer, remade the HelloWorld file and followed the course instructions again for initiating and linking the local/Github repositories and pushing the file to GitHub. The final command that worked for me was one the options suggested by GitHub when I set up the repo: git push -u origin master (after linking to the local repository). I still got the error messages, and got asked for my user name and password. I entered these (note that the password does not show up when you type it in...) and then got the error messages again but followed by detail:
error: git-credential-osxkeychain died of signal 11
error: git-credential-osxkeychain died of signal 11
Counting objects: 3, done.
Writing objects: 100% (3/3), 244 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/keh444/datasciencecoursera.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
When I looked on GitHub the HelloWorld file was in the repo, so it had worked.
While this may not have solved the problem in the long term at least I can now move on...

fatal: cannot create directory at ' ': No such file or directory

I clone project from server centOS to window , here is the error I got:
git clone ssh://git#xx.xxx.xx.xx:/home/git/srv/repos/projet.t2.company.com.git PROJ_V2
Cloning into 'PROJ_V2'...
git#xx.xxx.xx.xx's password:
remote: Counting objects: 7078, done.
remote: Compressing objects: 100% (5672/5672), done.
remote: Total 7078 (delta 1276), reused 6862 (delta 1073)
Receiving objects: 100% (7078/7078), 107.96 MiB | 18.00 KiB/s, done.
Resolving deltas: 100% (1276/1276), done.
Checking connectivity... done.
fatal: cannot create directory at ' ': No such file or directory
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Anyone know how to solve this ?

I have a Git repository. I have cloned the repository,Commited my local changes. When I push my changes to the server it shows error

when i pull the chages from clone, it is reflected in server and vice versa. but when i push it shows error.
Error message:
git.exe push --progress "origin" master:master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 474 bytes | 0 bytes/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To //INCHNLRDFS06/CUB Ebanking$/GIT_Ebank
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to '//INCHNLRDFS06/CUB Ebanking$/GIT_Ebank'
git did not exit cleanly (exit code 1) (1029 ms # 9/10/2014 6:43:09 PM)
If you are cloning from another user's repository, the origin remote (assuming you're pushing to origin) is linked to that user's repo.
In order to commit and push your changes, you first must fork that user's repo and clone from your fork. Doing so will set up your remote to your repo and you can commit and push as you please.
You can view your remotes in the .git/config file and correct them if you're still having trouble.

GitHub for Mac throw a Git Error when I clicked the Publish button

Like the Title, it throw me a Git Error message:
2013-06-08 13:51:35.249 GitHub for Mac Login[1883:707] AskPass with
arguments: (
"/Applications/GitHub.app/Contents/MacOS/GitHub for Mac Login",
"root#192.168.1.107's password: " )
2013-06-08 13:51:35.285 GitHub for Mac Login[1883:707] Error reading
attributes for password: OSStatus 840183217
Counting objects: 3, done.
Writing objects: 33% (1/3)
Writing objects: 66% (2/3)
Writing objects: 100% (3/3)
Writing objects: 100% (3/3), 215 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To root#192.168.1.107:/var/www/html/repository/ ! [remote rejected]
master -> master (branch is currently checked out) error: failed to
push some refs to 'root#192.168.1.107:/var/www/html/repository/' (1)
I'm a beginner of use git to control the program version, and I find something like GitHub for Mac to use easily.
What I should be in the linux server configuration?
I find some useful from
http://rogerdudler.github.io/git-guide/
How to publish files to my server?
Thank you!
The error message says that you are trying to push to a non-bare repository, i.e. a normal repository rather than one that was created (with git init --bare) to enable it to function easily as a "central" repository that can be pushed to.
If you want more guidance on how to get started with git, take a look at the question
Git for beginners: The definitive practical guide

Issue with GIT hosted on IIS with Bonobo

We installed Bonobo Git Server on a webserver using IIS7.
Everything seems to work fine, we create repositories, we clone them, but when we try to push we have this error:
$ git push origin master
Username:
Password:
Counting objects: 3985, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3561/3561), done.
Writing objects: 100% (3984/3984), 24.67 MiB | 7.70 MiB/s, done.
Total 3984 (delta 645), reused 0 (delta 0)
fatal: protocol error: bad line length character: <!DO
fatal: The remote end hung up unexpectedly
fatal: write error: Invalid argument
It happens when we do a big commit, usually our initial commit.
If I commit juste something like readme.txt it works just fine.
Most of our repos are migrations from SVN, we are working with it for about 2 weeks now and everything went great until we started a new project and made a big initial commit.
I did not manage to find anything useful by googling the error.
I also modified my git.config to this:
[http]
postBuffer = 524288000
sslVerify = false
But it does not solve my issue.
Thanks a lot,
Charles
I found the problem...In fact it was in Bonobo Web.config file
I had to add the following line:
<httpRuntime maxRequestLength="2147483647" />
in the node
<system.web>

Resources