Exercise 2: link to GitHub #8
-
In step 6.2 Sharing our git repository: Github I cannot push to git as I get the errors: I am using the updated path to my created GitHub repo: git@github.com:Sonia-Heye/pizza_course_reproducibility.git and did NOT add a readme / gitignore etc and kept the repository public (initially I tried this step using a private repo and thought this was the issue, but after re-doing a public version, the issue persists). Any ideas why the permissions could be denied? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Do you check if your user account in "git" match with your github account? I came across a similar error. And I found out the "git" use an account different from my github account where I plan to share the repo. After changing to the same account, then it works. |
Beta Was this translation helpful? Give feedback.
Hey,
Thanks for your tip! Changing the user name didn't work for me and I'm not entirely sure which action fixed my issue in the end, but I think it was this:
git remote set-url origin https://github.com/<user_name>/<repo_name>.git
- instead of:git remote add origin
.I then had to authorize the access on GitHub and I guess this set up a connection between my local git and my GitHub account and thereafter
git push -u origin main
worked for me too.