我如何使用Samba服务器位置进行GOPATH? [英] How do I use a Samba server location for GOPATH?

查看:167
本文介绍了我如何使用Samba服务器位置进行GOPATH?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我的GOPATH设置为共享网络文件夹。当我输入

  export GOPATH = smb:// path / to / shared / folder 
  go:GOPATH 

进入是相对的;必须是绝对路径:smb。
运行'go help gopath'进行使用。

我也曾尝试将路径加上前缀/,但随后尝试将



thx!

解决方案

只有一个解决方案:

将Samba服务器文件路径映射(安装)为本地磁盘驱动器(本地路径),
然后设置 GOPATH 到本地路径:

使用smbmount命令在本地文件夹中挂载SMB共享(不推荐使用smbmount):

 smbmount // ipadd / sharename / mountpoint -o username = userid,workgroup = workgroupname 

示例:

  smbmount //192.168.0.1/share1 / mnt -o username = steev,workgroup =测试

使用mount命令安装SMB共享

  mount -t smbfs ipadd:/ sharename / mountpoint -o username = userid,workgroup = workgroupname 



  mount -t smbfs // ipadd / sharename / mountpoint -o username = userid,workgroup = workgroupname 

示例:

  mount -t smbfs 192.168.0.1:/share1 / mnt -o username = surendra,workgroup = test 

ref:

http://www.linuxnix.com/8-ways-to-mount-smbfs-samba-file- system-in-linux /


https://askubuntu.com/questions/232998/how-do-i-install-smbmount
http://www.howtogeek.com/116309/use-ubuntus-public-folder-to-easily -share-files-between-computers /

和Windows: https://serverfault.com/questions/6079/how-can-i-mount-an-ftp-to-a-drive-letter-in-windows


I am trying to set my GOPATH to a shared network folder. When I enter

export GOPATH=smb://path/to/shared/folder

I get:

go: GOPATH entry is relative; must be absolute path: "smb".
Run 'go help gopath' for usage.

I've also tried to prefix the path w/ "/" but then it tries to make a folder in root.

thx!

解决方案

there is only one solution for this:
Map ( mount) a Samba server file path as a Local Disk Drive ( local path), then set GOPATH to this local path:

Mounting SMB share on local folder by using smbmount command (smbmount is deprecated):

smbmount //ipadd/sharename /mountpoint –o  username=userid,workgroup=workgroupname

Example :

smbmount //192.168.0.1/share1 /mnt –o username=steev,workgroup=test

Mounting SMB share by using mount command

mount –t smbfs ipadd:/sharename /mountpoint –o username=userid,workgroup=workgroupname

Or

mount –t smbfs //ipadd/sharename /mountpoint –o username=userid,workgroup=workgroupname

Example :

mount –t smbfs 192.168.0.1:/share1 /mnt –o username=surendra,workgroup=test

ref:
http://www.linuxnix.com/8-ways-to-mount-smbfs-samba-file-system-in-linux/

https://askubuntu.com/questions/232998/how-do-i-install-smbmount http://www.howtogeek.com/116309/use-ubuntus-public-folder-to-easily-share-files-between-computers/
and for Windows: https://serverfault.com/questions/6079/how-can-i-mount-an-ftp-to-a-drive-letter-in-windows

这篇关于我如何使用Samba服务器位置进行GOPATH?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆