# 解决每次git pull都要输入账号密码的问题

**URL:** https://www.shiqidu.com/t/topic/632
**Category:** 开发调优
**Tags:** GitHub
**Created:** [2019 年8 月 30 日 07:50 UTC](https://www.shiqidu.com/t/topic/632 "2019-08-30T07:50:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### 作者： ![blue91a4](https://www.shiqidu.com/user_avatar/www.shiqidu.com/blue91a4/32/518_2.png) [@blue91a4](https://www.shiqidu.com/u/blue91a4)
#### 发布日期： [2019 年8 月 30 日 07:50 UTC](https://www.shiqidu.com/t/topic/632/1 "2019-08-30T07:50:12Z")

</div>

首先进入到项目目录，输入下面的命令

```bash
git config --global credential.helper store

```

这个命令会在生成一个文件 `~/.git-credentials` 用来记录账号和密码。

然后输入 `git pull` 命令，会提示输入账号密码，命令执行完后 `~/.git-credentials` 文件里会保存你的账号密码，这样下次再次 `git pull` 的时候就不用输账号密码了。
