I try to clone a repo from a brand new Windows Install with wsl (Ubuntu 20.04). What I did : generate SSH key and add public key to both github and framagit. Tried
ssh -i -T [email protected]
And
ssh -i -T [email protected]
Both of them saied "Hello my pseudo, you're authentified"
But when I try to clone I have the following : Without sudo :
Cloning into 'testaaa'...
error: chmod on /mnt/d/dev/dev/testaaa/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'
With sudo :
Cloning into 'testaaa'...
ssh: connect to host framagit.org port 22: Network is unreachable
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What can I do to solve my issue?
Git can be installed on Windows AND on WSL An important consideration: when you enable WSL and install a Linux distribution, you are installing a new file system, separated from the Windows NTFS C:\ drive on your machine.
To clone your Github repo on Windows. If Git is not already installed, it is super simple. Just go to the Git Download Folder and follow the instructions. Go to the current directory where you want the cloned directory to be added.
You can fix this by following this guide. Summary below.
From a WSL prompt:
sudo vim /etc/wsl.conf
Add these lines:
[automount]
options = "metadata"
Save the file, shutdown wsl from a PowerShell prompt:
wsl --shutdown
Re-open a wsl terminal. You should see files owned by your user now instead of root. You can now git clone, chmod, chown etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With