
每次我试图通过git push原始主命令向主分支提交新的提交时,git都会用凭据提示我。我想通过以下命令将url从HTTPS转换为SSH:
$git remote add origin https://github.com/Ananya2001-an/FirstRepository
$git config --global credential.helper store
$git config --global credential.helper cache但是现在,虽然它没有要求凭据,但它仍然没有推动提交,而是向我展示访问权限被拒绝,并且我无法从远程存储库读取。请帮我解决我现在面临的问题。
发布于 2022-02-09 05:39:24
首先,从您的GitHub帐户获取git存储库链接
例如https://github.com/imrankabir/my-react-app.git
git远程设置-url原点https://imrankabir@github.com/imrankabir/my-react-app.git
注意在https://{imrankabir@}之后添加的用户名
现在运行以下命令
git配置credential.helper存储
git拉源母机
它将要求您的GitHub密码,只要一次相同的机器上。
如果未来它不会再要求密码。
https://stackoverflow.com/questions/71044405
复制相似问题