我已经为我的本地家庭网络设置了NetGear ReadyNAS设置,并在其中一个共享上安装了git远程存储库 . 请注意我在NAS上没有正确的git服务器设置 . 可以通过运行命令在本地克隆远程存储库:

git clone //nas/Common/CodeRepo/MyGitRepo

我的机器上还安装了Jenkins主设备,现在我正在尝试设置Pipeline项目以使用NAS上的MyGitRepo . 当我在管道下指定:“使用SCM管道脚本”并将以下任何一个作为Git存储库URL传递时,我收到错误消息:

Failed to connect to repository : Command "git.exe ls-remote -h \\nas\Common\CodeRepo\MyGitRepo HEAD" returned status code 128:
stdout: 
stderr: fatal: '\\nas\Common\CodeRepo\MyGitRepo' 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.

作为git repo url,我尝试过:

  • \ nas \ Common \ CodeRepo \ MyGitRepo

  • // nas / Common / CodeRepo / MyGitRepo

  • R:\ CodeRepo \ MyGitRepo(我在我的Windows 10机器上映射了\ nas \ Common作为R:驱动器)

我无需登录即可访问nas . 没有为访问NAS而创建特定用户 .

如何让Jenkins使用我的设置?