怎么使用git向开源中国提交代码?

    xiaoxiao2021-04-12  33

    借鉴了下面两篇文章:

    http://blog.csdn.net/wh_19910525/article/details/8128916

    http://www.cnblogs.com/weiguo21/p/5960402.html

    1:下载git,(windows下的git)然后打开git bash窗口,

    首先,git要求使用者必须提供自己的身份标识,为此我们需要在git bash中执行以下命令: git config --global user.name  "yuanqiao" git config --global user.email  "mkl34367803@163.com"

    Git Bash在其中输入如下命令:

    ssh-keygen -t rsa -C "mkl34367803@163.com"

    在C盘当前用户文件夹下,有个.ssh 文件夹,在里边 找到 id_rsa.pub文件,用记事本打开,复制其中的全部内容。

    2::你需要有个一个开源中国的账号,登录后,设置ssh公钥。如下图:

    1)找到修改资料按钮

    2)找到SSH公钥按钮,把上面生产的公钥复制到这里面去。

    3:最后在开源中国新建git项目。复制git的地址,如下图:

    4:然后在windows的git bash中使用

    git clone 地址    命令下载git项目,然后用git其他命令操作git项目就可以了。

    转载请注明原文地址: https://ju.6miu.com/read-667392.html

    最新回复(0)