添加和提交文件后,Git push不起作用 [英] Git push doesn't work after adding and committing files
问题描述
我是Github和Git的新手,尝试在Windows上使用gitbash.添加并提交文件后,如果我添加git push cmd.输入密码.我该怎么办?
I'm new to Github and Git, tried to use gitbash on Windows.After adding and committing files ,If I add the git push cmd.. The cli asks for username... And then a password with no interface to enter password.. What do I do?
推荐答案
在git bash中,您应该运行以下命令:
From git bash you should prefer to run the command:
git config --global credential.helper wincred
那时候,运行git pull之类的命令并输入一次凭证,应该将其存储起来以备将来使用. Git有一个内置的凭据系统,可以在不同的OS环境中工作.
At that point, running a command like git pull and entering your credentials one time should have it stored for future use. Git has a built-in credentials system that works in different OS environments.
您可以在git网站上获得更多详细信息 Git工具-凭据存储.
You can get more details on the git website Git Tools - Credential Storage.
如果git pull
之前已移至远程服务器,则应在git push
之前使用git pull
.
And you should use git pull
before git push
if it has been moved to remote server before.
希望它能起作用!
这篇关于添加和提交文件后,Git push不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!