1

我在一个域中有两台计算机,一台是Linux,另一台是Windows。我在 Linux 上构建了一个远程 repo,它的 URL 是10.10.10.1/test,我git init --bare用来构建这个 repo 并且没有错误报告。

在 Windows 站点上,我有一个本地存储库,并且我已经提交了文件。然后我给出以下命令:

$ git remote add origin 10.10.10.1/test

我检查了:

$ git remote -v
origin 10.10.10.1/test (fetch)
origin 10.10.10.1/test (push)

然后我试着把我的主人推到原点

$ git push origin master

我有

fatal: '10.10.10.1/test' 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.

我在本地窗口上尝试了相同的过程并且它可以工作,我也尝试过Github并且它也可以工作,所以我认为问题是我提供了错误的 URL。我可以从本地 ping 10.10.10.1,我也可以找到文件夹 /test,我尝试了以下 cmds,但它们也不起作用。

git remote add origin 10.10.10.1/test
git remote add origin \\10.10.10.1\test
git remote add origin \\\\10.10.10.1\\test
git remote add origin smb://10.10.10.1/test (git doesn't reconize the keyword 'smb')

在这种情况下我应该提供什么 URL,或者我需要修改 Linux 端的 Samba 中的任何设置?感谢您花时间阅读这么多。

蒂姆

4

0 回答 0