我在我的生产服务器上设置了一个空的 git repo
git init --bare
Run Code Online (Sandbox Code Playgroud)
在我的本地机器上,我将 repo 添加为远程:
git remote add origin ssh://user@example.com/~/git/example.com
Run Code Online (Sandbox Code Playgroud)
如果我发出以下命令
git remote show origin
Run Code Online (Sandbox Code Playgroud)
我收到一条错误消息说:
fatal: '~/git/example.com' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我尝试了此处提到的冒号,但没有帮助。