码迷,mamicode.com
首页 > 其他好文 > 详细

gitlab的git命令行操作

时间:2020-02-17 17:54:19      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:cts   class   print   lis   exists   public   span   finger   directory   

 

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ mkdir ~/.ssh
mkdir: cannot create directory ‘/c/Users/Administrator/.ssh’: File exi                                                                               sts

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ cd ~/.ssh

Administrator@PC201803221826 MINGW64 ~/.ssh
$ git config --global user.name "XX"

Administrator@PC201803221826 MINGW64 ~/.ssh
$ git config --global user.email "XX@lifeat.cn"

Administrator@PC201803221826 MINGW64 ~/.ssh
$ ssh-keygen -t rsa -C "XX@lifeat.cn"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:VMyQbkP6olb8oXXvfwsu/L35P5NTnw7SEhh1OEIvuHM 190438@lifeat.cn
The keys randomart image is:
+---[RSA 2048]----+
|        o*....   |
|        +o=o.    |
|       =.o...    |
|      ..= +      |
|     . =SE .     |
|      + * . o   .|
|     o = o.+ +  =|
|    o . .  o= +*+|
|   .       .++oB@|
+----[SHA256]-----+

Administrator@PC201803221826 MINGW64 ~/.ssh







Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ git config --global user.name "XX"

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ git config --global user.email "190438@lifeat.cn"

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ git init
Reinitialized existing Git repository in F:/BI/bi/二期/脚本/.git/

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ git remote add origin ssh://git@git.hopson.io:65508/data-center/hopsonone/                                                                         dp-data-analysis/easylife_data_analysis.git
fatal: remote origin already exists.

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ git remote add o ssh://git@git.hopson.io:65508/data-center/hopsonone/dp-da                                                                         ta-analysis/easylife_data_analysis.git

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ git add dws_broker_reward.sh dws_should_solid_knot_fc_ac.sh dws_total_amou                                                                         nt.sh

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ git commit -m "remote-shell"
[master (root-commit) 3730f82] remote-shell
warning: LF will be replaced by CRLF in dws_broker_reward.sh.
The file will have its original line endings in your working directory.
 3 files changed, 1170 insertions(+)
 create mode 100644 dws_broker_reward.sh
 create mode 100644 dws_should_solid_knot_fc_ac.sh
 create mode 100644 dws_total_amount.sh

Administrator@PC201803221826 MINGW64 /f/BI/bi/二期/脚本 (master)
$ git push -u o master
The authenticity of host [git.hopson.io]:65508 ([47.94.203.190]:65508) can                                                                         t be established.
ECDSA key fingerprint is SHA256:CRCRBb4FwTO0TNfqlBA6wBvRW+OKU4pc2mULCqbxMmk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added [git.hopson.io]:65508,[47.94.203.190]:65508 (EC                                                                         DSA) to the list of known hosts.
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 7.26 KiB | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To ssh://git@git.hopson.io:65508/data-center/hopsonone/dp-data-analysis/easy                                                                         life_data_analysis.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from o.

gitlab的git命令行操作

标签:cts   class   print   lis   exists   public   span   finger   directory   

原文地址:https://www.cnblogs.com/shengyang17/p/12125309.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!