[FIX] fix splicing connection information error. (fixed #45)

This commit is contained in:
goodrain 2018-03-08 22:11:49 +08:00
parent 30ca8527f8
commit 56adbb8cf7
2 changed files with 2 additions and 2 deletions

View File

@ -679,7 +679,7 @@ type BuildServiceStruct struct {
SlugPath string `json:"slug_path"`
FTPHost string `json:"ftp_host"`
FTPPort string `json:"ftp_port"`
FTPUser string `json:"ftp_user"`
FTPUser string `json:"ftp_username"`
FTPPassword string `json:"ftp_password"`
} `json:"slug_info"`
}

View File

@ -72,7 +72,7 @@ func NewSFTPClient(username, password, host, port string) (*SFTPClient, error) {
Auth: auths,
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
addr := fmt.Sprintf("%s:%d", host, port)
addr := fmt.Sprintf("%s:%d", host, fb.Port)
conn, err := ssh.Dial("tcp", addr, &config)
if err != nil {
logrus.Errorf("unable to connect to [%s]: %v", addr, err)