打開(kāi)Goland握础,選擇File=》Plugins=》Install JetBrains plugins
搜索Remote Hosts Access恭陡,點(diǎn)擊Install
安裝好之后,重啟GoLand
配置
Settings=》build, execution, deployment=》deployment
Add Server:命名和選擇SFTP
Connection里面的設(shè)置:
SFTP host:填寫(xiě)服務(wù)器ip
Root path:服務(wù)器的go項(xiàng)目存放路徑坦报,例如我配置的是/home/Go/go-project
User name:服務(wù)器賬號(hào)
Password:服務(wù)器密碼
Mappings里面的設(shè)置:
Local path:本地電腦的項(xiàng)目路徑
Deployment path on server:具體某個(gè)項(xiàng)目的路徑
配置完成!
把服務(wù)器項(xiàng)目下載到本地的項(xiàng)目文件中(2種情況:項(xiàng)目未下載過(guò)本地或已下載過(guò)本地):
1狂鞋、之前未把項(xiàng)目下載到本地:
(1)片择、Tools=》Deployment=》Browse Remote Host
(2)彈出Remote Host之后,右鍵選擇項(xiàng)目=》Download from here
2骚揍、項(xiàng)目已下載的本地
Tools=》Deployment=》Download from xxx
本地代碼修改完成之后字管,上傳到服務(wù)器更新:
Tools=》Deployment=》Upload to xxx
文章來(lái)源:https:www.nrgh.net
未經(jīng)允許,禁止轉(zhuǎn)載