git初始配置存储帐号等

星期三, 2019-02-27 | Author: Lee | linux | 1,585 views

信息保存在 当前帐号的 ~/.gitconfig 下和 ~/.git-credentials

1.配置提交的用户名及email地址

$ git config --global user.name "Leeyz"
$ git config --global user.email "[email protected]"

2.配置自动保存帐号信息省的每次 pull 都输入密码

$ git config --global credential.helper store

3. 移除帐号信息可以

$ rm ~/.gitconfig
$ rm ~/.git-credentials

4.密码等信息重新修改可以使用下面命令移除保存的密码信息

$ git config --global http.emptyAuth true

更多使用手册参考:https://git-scm.com/book/zh/v2

Tags:

文章作者: Lee

本文地址: https://www.pomelolee.com/1850.html

除非注明,Pomelo Lee文章均为原创,转载请以链接形式标明本文地址

一条评论 to git初始配置存储帐号等

Lee
2022 年 04 月 18 日

配置项目下的git用户信息,会覆盖全局的设置给指定项目设置用户
# vim gitlab_demo/.git/config 文件

[user]
name = gitlab_name
email = [email protected]

Leave a comment

Search

文章分类

Links

Meta