因此,当我使用HTTPS方法克隆git存储库并做一些更改并将push
或pull
作为git时,它总会提示我username and password
。有什么解决方案?Git需要git push的用户名和密码,使用HTTPS方法的git pull
0
A
回答
0
除了更改为SSH之外,如果您不介意以明文形式输入密码,还可以继续使用HTTPS。把它放在你的〜/ .netrc里,它不会要求你的用户名/密码(至少在Linux和Mac上)
在你的主目录下制作一个.netrc
文件。
machine github.com
login <user>
password <password
0
+1
这仅适用于单个回购。 –
相关问题
- 1. xcode git pull/push crash
- 2. git merge,push,pull confusion
- 3. Git中的用户名和密码
- 4. `git pull`后需要`git checkout`吗?
- 5. Git Push/Pull VS 2015 Issue
- 6. git push/pull - 默认为github
- 7. GIT pull请求root密码
- 8. 使用git拉用户名和密码aws代码提交
- 9. git pull和git push的不同默认远程(跟踪分支)
- 10. 无法'git submodule foreach git pull'
- 11. 使用Qt Creator的git push
- 12. Git配置 - 仍然要求用户名和密码
- 13. git fetch和git pull混淆
- 14. 不需要在Ubuntu中输入git pull的密码
- 15. 用git push发送密码短句
- 16. 我可以使用git pull --rebase而不是“git stash git pull git stash pop”吗?
- 17. git pull VS git fetch git rebase
- 18. 完全卡在git中 - “git push”不起作用,“git pull”也不能修复
- 19. Git Hook for git pull
- 20. shell_exec和git pull
- 21. 使用用户名和密码的SSH git命令
- 22. Git:停止git push
- 23. git push .git/description file
- 24. Git push:如何避免多个存储库中的用户名和密码?
- 25. git每次推送需要的密码
- 26. `git push`显示错误。无法推送到`git://`。尝试`https://`
- 27. git pull --rebase upstream&git push origin拒绝非快进?
- 28. 为什么“git push”被拒绝? (“git pull”没有帮助)
- 29. 使用libgit2做Git Pull
- 30. 如何避免在本地机器上提供用户名和密码来git push/pull/fetch?
我找到了解决办法! –
“解决这个问题”是什么意思?你在问什么? –
@ Code-Apprentice现在可以吗? –