Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialpeter ford
2,742 PointsSuccessfully created project, but initial push failed: The requested URL returned error: 403
Hello,
I am attempting to share one of the Treehouse Projects up on github, however I am having trouble pushing the code to the repo. Android Studio creates the repository for me and I am able to see it however every time I try to push the code I get the error above.
I already tried changing my global configs as mentioned in one of the previous questions and it still did not work.
1 Answer
Seth Kroger
56,413 PointsA response code of 403 means you aren't authorized to push the repository. Did you create an empty repository on GitHub for the project and use the URL for that? Did you double-check the GitHub token/password settings in Android Studio?
peter ford
2,742 Pointspeter ford
2,742 PointsThanks for your response. I was able to resolve the issue. The problem was that I have 2 github accounts ( 1 for work, 1 for personal use ), when I installed Git Bash on my Windows machine I also set the generic credentials for github to my work account. Even though in Android Studio I set my credentials to my personal account, windows overwritten it the credentials to my work account hence why I was unable to push to the repo on my personal account. I attached a link to StackOverflow page that pointed me to this issue.
https://stackoverflow.com/questions/39422521/how-can-i-change-the-user-on-git-bash
Thanks again!