Home

cuipf blog

21 Sep 2017

atom一些插件配置说明

atom远程服务同步文件插件Remote-Ftp和Remote-Sync

  1. 注意这两个插件连接都不能直接使用用户名和密码,需要使用ssh的私钥登陆;
  2. 执行命令ssh-keygen -t rsa 生成私钥id_rsa和公钥id_rsa.pub;
  3. 修改配置文件/etc/ssh/sshd_config
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys
AuthorizedKeysFile      /root/.ssh/id_rsa.pub
  1. 重启sshd服务;
  2. 拷贝id_rsa到windows下目录 ** E:\code\taomee_prj\id_rsa **;
  3. 修改Remote-Sync配置文件如下;
{
  "uploadOnSave": true,
  "useAtomicWrites": false,
  "deleteLocal": false,
  "hostname": "10.1.1.119",
  "port": "9001",
  "target": "/home/evan/src",
  "ignore": [
    ".remote-sync.json",
    ".git/**"
  ],
  "username": "root",
  "keyfile": "E:\\code\\taomee_prj\\private-key\\10.1.1.119\\id_rsa",
  "watch": [],
  "transport": "scp"
}

或者修改Remote-FTP配置文件如下:

{
    "protocol": "sftp",
    "host": "192.168.208.128",
    "port": 22,
    "user": "root",
    "pass": "123456",
    "promptForPass": false,
    "remote": "/",
    "local": "",
    "agent": "",
    "privatekey": "E:\\code\\taomee_prj\\private-key\\192.168.208.128\\id_rsa",
    "passphrase": "",
    "hosthash": "",
    "ignorehost": true,
    "connTimeout": 10000,
    "keepalive": 10000,
    "keyboardInteractive": false,
    "watch": [],
    "watchTimeout": 500
}

atom 配置文件同步工具(Sync-settings)

配置

  1. 配置Personal Access Token,GitHub账号已生成如下;

     ba067b4d7a0c6872bbf79*************
    
  2. 配置Gist id

     9ad0bc1d4de23a1910*************
    

使用方法

  • 在编辑界面,使用快捷键Ctrl+shift+p调出全局命令搜索面板;
  • 命令:sync-settings:backup 备份当前配置文件;
  • 命令:sync-settings:restore 恢复配置,直接覆盖本地的配置;
  • 命令:sync-settings:view-backup 查看线上配置;
  • 命令:sync-settings:check-backup 检测最新备份;

cuipf

scribble