添加和提交文件后,Git push不起作用 [英] Git push doesn't work after adding and committing files

查看:244
本文介绍了添加和提交文件后,Git push不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆