因此,當我使用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現在可以嗎? –