[root@k8s gitlab]# useradd zhangsan
[root@k8s gitlab]# passwd zhangsan
Changing password for user zhangsan.
New password:
BAD PASSWORD: The password fails the dictionary check - it is too simplistic/systematic
Retype new password:
passwd: all authentication tokens updated successfully.
[root@k8s gitlab]# su - zhangsan
[zhangsan@k8s ~]$ mkdir -p ~/zhangsan/gitlab
[zhangsan@k8s ~]$ cd zhangsan/gitlab/
[zhangsan@k8s gitlab]$
1.配置该git的使用者
git config --global user.name "zhangsan"
2.配置git使用者的邮箱
git config --global user.email "zhangsan@qq.com"
3.使文本高亮
git config --global color.ui true
[zhangsan@k8s gitlab]$ cat ~/.gitconfig
[user]
name = zhangsan
email = zhangsan@qq.com
[color]
ui = true
git config --global http.sslVerify false
[zhangsan@k8s gitlab]$ git clone https://192.168.1.8:8443/it-group01/it-items.git
Cloning into 'it-items'...
Username for 'https://192.168.1.8:8443': zhangsan
Password for 'https://zhangsan@192.168.1.8:8443':
warning: You appear to have cloned an empty repository.
[zhangsan@k8s gitlab]$ cd it-items/
[zhangsan@k8s it-items]$ git add README.md
fatal: pathspec 'README.md' did not match any files
[zhangsan@k8s it-items]$ touch README.md
[zhangsan@k8s it-items]$ git add README.md
[zhangsan@k8s it-items]$ git commit -m "1.0-zhangsan carte a file for README.md"
[master (root-commit) 9dcfd68] 1.0-zhangsan carte a file for README.md
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
[zhangsan@k8s it-items]$ git log --oneline
9dcfd68 1.0-zhangsan create a file for README.md
ssh-keygen -t rsa
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIPoVZkyzMnQ1PPzwBm1Cu1COzbvoXcPR/PH5cgPa9aiJMOGWUevknFh6Rj67v+0ju+piZUsPDcNBhAXHlhzfiQF+aToKLIK5RnwVmiuQF2notc484yYCKlIe/SUNOb3PSU1wAoXBzB+xD0kIIhVwoC6mdpadPCuQr5gWlzSJdKGrU+TC4boaQP7wdJ8EhhJgTrt6Emki7lm++aKMzPojBek3HnWb+qRbBDmKCBnF4XjIjogQIsWh7OHs9ss9rY1kRhyx/28lFeSd7CVGBSHPFnm+ghhKAjom1vu5BAwrThBcP0J7MXDA/7/1P3tsTa34D0CTeEBr6xuN4g6In3T9t zhangsan@k8s
git remote rename origin old-orign
git remote add origin https://192.168.1.8:8443/it-group01/it-items.git
git push -u origin master
git remote -v
git remote remove old-orign
git remote remove origin
我正在参与2023腾讯技术创作特训营第三期有奖征文,组队打卡瓜分大奖!
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。