Fatal: '/git_repos/tools.git' does not appear to be a git repository

你离开我真会死。 提交于 2019-12-24 06:58:22

问题


I'm developing on a local windows machine and have a git repository I'd like to push to my remote dev server (mysite.com) via ssh but I keep receiving this error:

fatal: '/git_repos/tools.git' does not appear to be a git repository

fatal: Could not read from remote repository.

To clarify, I have created a folder on my remote server (git_repos/tools.git), and set up a new repo within it:

git init --bare

The folder is owned by "user" and user has full access privileges. I have then added the remote location to my local repo :

git remote add origin ssh://user@mysite.com:/git_repos/tools.git

and attempted to push the master branch up, using:

git push -u origin master

however I always encounter the above error. I am able to log in via SSH through putty, although I always land in the user root directory and not the "git_repos/tools.git" subfolder.

Has anyone encountered this issue before? Is there something I'm doing wrong?

来源:https://stackoverflow.com/questions/46132539/fatal-git-repos-tools-git-does-not-appear-to-be-a-git-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!