zoukankan      html  css  js  c++  java
  • git push出错的解决办法

    今天push代码到线上的时候怎么都不行,尝试了很多办法报了好几种错比如:

    反正就是各种错,然后其实不管什么错,你全部Git init 一下然后重新配置

    git config --global user.name "your name"
    
    git config --global user.email "your email"

    然后查看一下自己的信息

    git config --global user.name
    git config --global user.email
    git config --global --list

    有的小伙伴可能没有ssh公钥,先查看一下

    cat ~/.ssh/id_rsa.pub

    如果有就复制没有的话就如下:

    ssh-keygen -t rsa -C "your account"

    your account是你的邮箱,点击回车使用默认值,或者可以输入存放键值对和密码的位置和文件名。

    结束之后继续输入获取公钥的指令来获取公钥,然后把他添加到GitHub和(你的阿里云code代码管理上)根据个人需要

    然后输入如下命令:

    git init
    git remote add origin git@code.aliyun.com:account/TestProject.git
    git add .
    git commit -am "message"
    git push -u origin master

    然后可能还不行就报这个错

    那么接下来输入:

    git pull --rebase origin master

    然后就好啦,再次执行push命令就可以啦!

  • 相关阅读:
    在Unity3D中开发的Hologram Shader
    在Unity3D中开发的Toon Shader
    在Unity3D中开发的Dissolve Shader
    2017.2.26
    2017.2.21
    2017.2.20
    2017.2.19
    2017.2.18
    2017.2.17<转>
    2017.2.16 linux
  • 原文地址:https://www.cnblogs.com/wxy0126/p/11395639.html
Copyright © 2011-2022 走看看