git中每次执行push都需要输入账号密码问题

  • Post author:
  • Post category:其他




问题描述

每次在执行

git push 

时需要重复输入账号和密码问题,这样子比较浪费时间和重复操作

可以使用如下操作


亲测有效

Andrewer@CaesarGattuso MINGW64 /d/BaiduNetdiskDownload/gitRepository/test01 (b1)
$ git config --global credential.helper store

之后查看效果,会发现有一条

credential.helper=store


Andrewer@CaesarGattuso MINGW64 /d/BaiduNetdiskDownload/gitRepository/test01 (b1)
$ git config --list
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
user.name=Andrew
user.email=dac_ej@yeah.net
user.password=luiguanghan
gui.recentrepo=D:/BaiduNetdiskDownload/gitRepository/test02
http.sslverify=false
credential.helper=store
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=https://gitee.com/doreamen-ac/test01.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
gui.wmstate=normal
gui.geometry=841x483+208+208 189 218

Andrewer@CaesarGattuso MINGW64 /d/BaiduNetdiskDownload/gitRepository/test01 (b1)

之后push操作只需要输入一次账号和密码之后就可以不需要重复输入了