使用远程主机ID和git库地址启动SmartIDE远程开发环境

1. 添加远程linux服务器

https://smartide.cn/zh/docs/quickstart/

smartide host add 121.40.45.89 --username root --password xxxxxx --port 22
#获取远程主机ID

2. 使用git仓库启动远程服务器上的环境

  • 注意:—branch 不生效的需要清除一下服务器上~/project 目录的缓存
#使用公开库
smartide start --host 1 http://git.pyun.com/smart01.git 
#使用私库
smartide start --host 2 --repourl  http://帐号:密码@git.pyun.com/smart01.git
#使用分支
smartide start --host 2 --repourl  http://帐号:密码@git.pyun.com/smart01.git --branch s001

#创建成功后在命令行有映射的url地址,复制地址即可使用
#如需直接打开文件夹可以url后面带上目录参数 /?folder=vscode-remote://localhost:6800/home/project