I have a slightly complex issue that can be split across two work environments:
- My Windows 10 work computer
- A Linux server, accessible via SSH, VNC and networked SAMBA drive using a VPN
There are two git repos on the server:
- An archived, shared repo, located at //xxx.xxx.xxx.xxx/repos/git-matlab/
- My personal repo, located at //xxx.xxx.xxx.xxx/my-username/repos/personal-repo/
I have set up my SSH keys on both systems (they are present in ~/.ssh).
I have been able to push, pull and clone to personal-repo from my Windows machine without any issues.
When attempting to clone to git-matlab from my Windows machine, I get the following error:
$ git clone --branch=main //xxx.xxx.xxx.xxx/repos/git-matlab/
Cloning into 'git-matlab'...
error: refs/heads/main does not point to a valid object!
fatal: Remote branch main not found in upstream origin
When attempting to clone to git-matlab from personal Linux environment on the server using PuTTY, I get a large error. Output is summarised as follows:
$ git clone --branch=main /home/repos/git-matlab/
...
warning: failed to stat /home/repos/git-matlab/.git/objects/a5/1396ecd11cf0fd93cedd0dff1deda885508e3d
warning: failed to stat /home/repos/git-matlab/.git/objects/a5/f60d21cf9955ab0b6c82c12fefaa9e1f51dfc0
warning: failed to stat /home/repos/git-matlab/.git/objects/f3/.
warning: failed to stat /home/repos/git-matlab/.git/objects/f3/..
warning: failed to stat /home/repos/git-matlab/.git/objects/f3/4fd030aeee62a14e915e1fe06d2a7a22e2595e
warning: failed to stat /home/repos/git-matlab/.git/objects/f9/.
warning: failed to stat /home/repos/git-matlab/.git/objects/f9/..
warning: failed to stat /home/repos/git-matlab/.git/objects/f9/7e571b07827b8e32be70c38191cae18e3295b9
done.
A git-matlab folder with a .git directory inside does get outputted but that's it.
I should add that these are both shared repos. I also have permissions to view the git-matlab directory via Windows Explorer and Nautilus (Linux file explorer).
Any help or insight would be hugely appreciated. Thanks in advance.