简体   繁体   English

Git Push:我无法将文件添加到我的仓库中,因为Git不允许我输入我的Github密码

[英]Git Push: I can't add a file to my Repo since Git doesn't allow me to enter my Github password

Intro 介绍

I'm pretty new to Git and Github, and I am just trying to add (new) files to a repo I created on Github. 我对Git和Github还是很陌生,我只是想将(新)文件添加到我在Github上创建的仓库中。 I have Windows 7. I have found some supposed solutions for Linus/OX on Stack Overflow, but it does not work for Windows 7. 我有Windows7。我在Stack Overflow上找到了Linus / OX的一些假定解决方案,但不适用于Windows 7。

I have found a similar question on Stack Overflow. 我在堆栈溢出中发现了类似的问题。 Users answered that it is common for passwords to remain invisible, but that it should work if you enter in the password anyways. 用户回答说,密码通常保持不可见,但是如果您仍然输入密码,它应该可以使用。

I do not care if I have to enter my username/password in every time I want to push to GitHub. 我不在乎每次要推送到GitHub时是否都必须输入用户名/密码。

Problem 问题

I have committed various files and need to push them to GitHub from Git. 我提交了各种文件,需要将它们从Git推送到GitHub。 In Git Bash/the terminal, all steps from the beginning tutorials/Google answers to add files from your computer onto GitHub are successful until the very last step ( git push origin master ). 在Git Bash /终端中,从开始教程/ Google回答到将文件从计算机添加到GitHub的所有步骤都成功,直到最后一步( git push origin master )。

At this point, the terminals prompts me to enter my username (no problem, successful) and my password. 此时,终端提示我输入用户名(没问题,成功)和密码。 Nothing shows up when I type my password. 键入密码后,什么都没有显示。 If I type my password in and press enter afterwards anyways, nothing happens/it does not work. 如果我输入密码,然后仍然按Enter键,则不会发生任何事情/它将不起作用。 I have tried this multiple times. 我已经尝试了多次。 The password works on GitHub/the password is correct. 密码可在GitHub上使用/密码正确。

Further information 更多信息

GitHub shows that I have a ReadMe file and a license in my repo. GitHub显示我的仓库中有一个ReadMe文件和一个许可证。 I will need to add an html, css, and jpg file to GitHub. 我需要将html,css和jpg文件添加到GitHub。

When you type the password the cursor won't move on the command-line. 当您输入密码时,光标不会在命令行上移动。 Then type the password, then press enter. 然后输入密码,然后按Enter。 I got it to work! 我懂了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM