I'm getting an error when cloning a bitbucket-hosted repository to my computer.
When I enter in git bash:
git clone https://myusername@bitbucket.org/groupname/repositoryname.git
I get the message
Cloning into 'repositoryname'..
fatal: bad config line 1 in file U://.../repositoryname/.git/config
Unlink of file 'repositoryname/.git/config' failed.
Should I try again? (y/n)
The destination folder contains a .git
subfolder, which itself contains the file config
, along with a hooks
subfolder containing various files.
The config file has the following contents:
[core]
repositoryformatversion = 0
filemode = false
Trying again by hitting y accomplishes nothing.
I am aware of a similar question asked earlier: Bad git config file .git/config , but that had to do with a repository that was being worked on.
This is a problem with even getting started, so I'm at a loss to see what to do.
In case my .gitconfig
file is considered as a possible source of the error, here its contents:
[user]
name = ...
email = ...
Please check if you are cloning on a network drive , it is probably not working because of that.
If you can, please just switch to local machine.
If you really need to clone on a network drive please check if the problem is caused by hardlinks by using the --no-hardlinks option:
git clone --no-hardlinks /path/to/your/repository
NB: usually this happens if your HOMEDRIVE
/ HOMESHARE
environmental variables are set on a network drive and you clone for the first time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.