无法将Android Studio项目推送到Github

时间:2019-12-07 13:42:45

标签: android git android-studio github

我最近被介绍给GitHub。我创建了一个项目并在GitHub上共享了它。在此之前,我已经安装了git和Git Bash。我可以提交更改,但不能从Android Studio推送更改。它会显示权限被拒绝错误。

enter image description here

我尝试使用

从命令行(Git Bash)推送

git push origin master

但相同的错误。搜索后,我找到了解决方法

git push https://github.com/user/project master

但是我无法找出问题所在,因为很难将项目与Android Studio正确同步

1 个答案:

答案 0 :(得分:0)

尝试重置远程URL并推送。

以下是更改遥控器的命令

git remote set-url origin https://github.com/USERNAME/REPOSITORY.git