This whole thing is because i want to have code deployed (and synced) to a live hosting enviromnet, for a website i'm working on (need to actually see the changes i'm doing) - the route being, Bitbucket repo (code being worked on) -> local repo -> HostGator repo (results being visualized).
I'm using Git Bash
on Windows. I have a git repository on HostGator in public_html
named "test" - configured and everything works fine - i can commit, branch etc.
They (HostGator) only allow for a port 2222
on a SSH connection. I've created a local empty repository and then added the remote repository to the remote repository list, like so:
git remote add localName ssh://username@address:2222/public_html/test
This is because, try as i might, i can not get SSH to read and apply my local config file.
Then to test that everything works fine i've tried:
git ls-remote ssh://username@address:2222/public_html/test
This connects, asks for a password, and then fails with the message that public_html/test is not a git repository
. I've checked permissions, everything's fine.
Question is: why does it fail and not recognize the repository? Is it something in my path, the way i add the remote repo?
EDIT: upon further investigations, even though the directory test
is a repository and contains the .git folder, git remote -v
shows the end path without the ".git" 'extension' - "public_html/test" as opposed to "public_html/test.git" , second being normal for a repository. This leads me to believe the syntax for adding it is not correct.