1

I'm trying to clone a bitbucket repository. When I do git clone on that repository, I am getting the following error -

Cloning into :"my-repo-name". . .
fatal: bad config line 1 in file /u/userid/my-repo-name/.git/config

This directory or config file doesn't even exist, so I'm not sure how I can go about modifying it to fix it. I have my global config file setup properly, I simply have my username and email address.

username@unix:-bash-4.3$ git config --list --show-origin        
file:/u/userid/.config/git/config      user.name=unix: userid

I'm a bit of a git noob. Any advice? Thanks

Robkule424
  • 11
  • 3
  • 1
    I think this will help you: https://stackoverflow.com/questions/9509125/bad-git-config-file-git-config – rasengan__ Oct 19 '20 at 18:35
  • So I tried copying an older repository's config file into the directory I wish to clone to, but then I get the following error. fatal: destination path '.' already exists and is not an empty directory. – Robkule424 Oct 19 '20 at 20:20

1 Answers1

0

Check first your environment variables with the command "set" in a regular CMD on Windows.

You might have a HOME (or HOMEDRIVE, or ...) which would still reference the network drive U:, while you are not in an environment where U:\ is accessible: you can see an example here.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250