2016-03-13 15 views
0

使用崇高文本連接到openshift ftp 3.我已經嘗試過使用SFTP插件。這是我的配置文件:使用崇高文本連接到openshift ftp 3

{ 
// The tab key will cycle through the settings when first created 
// Visit http://wbond.net/sublime_packages/sftp/settings for help 

// sftp, ftp or ftps 
"type": "sftp", 

"sync_down_on_open": true, 
"sync_same_age": true, 

"host": "nodebb-htforum.rhcloud.com", 
"user": "56d3d2e189f5cfad110001a1", 
"password": "******", 
"port": "22", 

"remote_path": "/", 
//"file_permissions": "664", 
//"dir_permissions": "775", 

//"extra_list_connections": 0, 

"connect_timeout": 30, 
//"keepalive": 120, 
"ftp_passive_mode": true, 
//"ftp_obey_passive_host": false, 
"ssh_key_file": "C:/Users/Nihal/.ssh/id_rsa", 
//"sftp_flags": ["-F", "/path/to/ssh_config"], 

//"preserve_modification_times": false, 
//"remote_time_offset_in_hours": 0, 
"remote_encoding": "utf-8", 
//"remote_locale": "C", 
//"allow_config_upload": false, 
} 
+0

您忘記提及您面臨的問題 – ericosg

+0

@ericosg我無法連接到openshift服務器。 – Nisthar

+0

您能否澄清問題所在? 「無法連接」不是很具描述性。你真正看到了什麼?你有任何錯誤?請花點時間閱讀[如何提出一個好問題?](http://stackoverflow.com/help/how-to-ask)您可以隨時[編輯]您的問題。 – Carpetsmoker

回答

1

要使用崇高文字的SFTP連接到OpenShift你可以按照下面的步驟:

1. Install Client tools (on windows): 
    https://developers.openshift.com/getting-started/windows.html#client-tools 

    * If you using MacOS: Only install rhc: 
     $ sudo gem install rhc 

     If you get the "Operation not permitted" (EPERM) error, run instead: 
     $ sudo gem install -n /usr/local/bin rhc 

     If you encounter any dependency issues, you may need to run: 
     $ sudo gem update 

2. Create RSA Key: 

    rhc setup 

    You’ll be prompted for your OpenShift username and password: 
     Login to openshift.redhat.com: Your email ([email protected]) 
     Password: Your password 

follow the steps setup to create private key and public key. this step too upload public key to Your OpenShift App. 

3. Config sftp connect to OpenShift App: 
All Os can use: 

    type: sftp 
    Host: [your app name]-[your openshift domain].rhcloud.com 
    User: App ID (https://openshift.redhat.com/app/console/application/687ac8fd0c1e665b5300011b-[your app name] => app id is: 687ac8fd0c1e665b5300011b) 

    remote_path: /var/lib/openshift/your app id/app-root/repo/php/ (for php app or wordpress app: /var/lib/openshift/your app id/app-root/data/current) 

3.1 For Linux and MacOS use sftp need rsa key: 
    Pass: password login to OpenShift) 
    Port: 22 
    ssh_key_file: "~/.ssh/id_rsa" 

3.2 For Windows Sublime Text use psftp need private key: 
    //Pass: (not use) 
    //Port: 22 (not use) 
    ssh_key_file: "C:\\Users\\Your username\\.ssh\\your private key.ppk" (More Step 4) 
  • 如何創建私人從公共密鑰使用Puttygen

    Download and Open Puttygen then click on Generate button and move mouse to complete public key. 
    
    Kick on Save private key button and Save to C:\Users\Your username\.ssh\your name private key.ppk 
    
    On Openshift at Settings tab kick Add a new key and paste public key just create at Puttygen to key content on Opnshift. 
    
  • 該政黨成員重點rial在Linux,MacOS和Windows上操作Sublime Text 2,3.

    最後:右鍵單擊項目文件夾=> SFTP/FTP =>瀏覽遠程。

    完成!