美文网首页
开发工具攻略(一)

开发工具攻略(一)

作者: SilenceZhou | 来源:发表于2018-08-08 18:34 被阅读6次

    本篇已同步到 个人博客 ,欢迎常来。

    1. Sublime安装插件报错解决办法

    错误:There are no packages available for installation

    解决办法:

    Step1:
    
    Preferences->PackageSettings->PackageControl->Settings-User
    
    Step2:
    在文件里面添加如下代码:
    "debug": true,
    "downloader_precedence": {
            "windows": ["wininet"],
            "osx": ["curl", "wget"],
            "linux": ["urllib", "curl", "wget"]
        },
    
    
    Step3:
        ⁃   command + shift + p 进行插件安装
        
        首先的安装插件管理器: Install Package
        然后输入要安装的插件名称
    

    2. Github转移项目到Coding.net

    笔者的需求:个人博客部署系统代码不需要进行在github上进行公开,github私有项目又需要付费,感觉不值,所以有此次需求

    参考

    1. Coding.net上建立一个新的私有仓库(有就不用建立)

    2.Coding.net配置公钥,git操作需要权限

    Step1
    command+shift+. 展示隐藏文件,然后cd到.ssh文件下面找到.pub结尾的文件(即公钥文件),拷贝私钥
    
    Step2
    coding个人中心 - SSH公钥 - 新增公钥  添加就好
    
    

    3. 把github上的代码clone到指定路径

    git clone --bare https://github.com/***/******.git
    
    ps: --bare 创建的克隆版本库都不包含工作区,直接就是版本库的内容,这样的版本库称为裸版本库。
    

    4.使用镜像推送的方式上传代码到新的服务器

    cd xxxx.git
    
    git push --mirror https://git.coding.net/cc412/xxxx.git
    
    ps:  https://git.coding.net/cc412/xxxx.git  是coding.net仓库地址
         如果https不行推荐用SSH
    
    

    5.删除本地代码

    cd ..//返回上一路径
    rm -rf xxxx.git //干掉
    

    6.从新服务器clone下来,就是你想要的库了

    git clone https://git.coding.net/cc412/xxxx.git
    
    ps: 如果https不行推荐用SSH
    
    

    7. 码云 也是一样的操作,笔者验证码云https和SSH都OK,最终用哪个看自己需要,笔者最终选择了码云!

    相关文章

      网友评论

          本文标题:开发工具攻略(一)

          本文链接:https://www.haomeiwen.com/subject/oxgxbftx.html