I can push to my personal github account, but I am trying to push to an organization repo. How can I configure Pycharm to use an organization repo instead of a personal one? Thanks.
This seems not to work, I had the same problem.
This was my workaround:
- Create a new github organization repository and name it like your local project
- Open PyCharm and checkout the organization project into a directory different from your PyCharm project directory (if your local project with the same name lies there)
- Close PyCharm and copy all files and folders from the checked out organization repository into your local project folder
- Open your local project in PyCharm and add the .idea folder (with contains your PyCharm IDE project information) to the .gitignore file
- Finally commit and push your local project content to your organization repository!
- (Don't forget to delete the your former checkout folder)
This works because all git-paths are relative.
This worked for me.
- close PyCharm
- open a terminal in or from terminal navigate to the local project directory.
- run your version of:
git remote add origin https://github.com/<organization>/<project>.git
- open PyChram and push project: "VCS"->'git'->'push'
This seems not to work, I had the same problem.
This was my workaround:
- Create a new github organization repository and name it like your local project
- Open PyCharm and checkout the organization project into a directory different from your PyCharm project directory (if your local project with the same name lies there)
- Close PyCharm and copy all files and folders from the checked out organization repository into your local project folder
- Open your local project in PyCharm and add the .idea folder (with contains your PyCharm IDE project information) to the .gitignore file
- Finally commit and push your local project content to your organization repository!
- (Don't forget to delete the your former checkout folder)
This works because all git-paths are relative.
This worked for me:
- Goto Git > Manage Remotes
- Add your repo remote (Organization repo)
- Once it asks you to login with GitHub, click "Login with token"
- Generate a GitHub token on github.com and grant the permissions PyCharm tells you to but make sure you allow "org:write" too.
- Input your generated token
- And boom! You should be able to push to organizations
This may not be a direct answer to the question, but it caused me a great deal of frustration with using an Organization with PyCharm until I figured it out.
Here is what I ran into:
- Could see another organization's repos
- Could NOT see a new organization's repos I created
You must turn off Third-party Application Restrictions in the GitHub organization in question.
To do that:
- Navigate to the organization in question
- Use the Settings button to get to the organization's settings page
- On the left-hand side, scroll toward the bottom to OAuth Application Policy
- Click the Remove Restrictions button
Once I cleared that setting, I was immediately able to see and work with the repos in my new organization. Upon clearing that setting, the button changes to Setup application access restrictions. I recommend configuring third-party access reasonably to align with your organization's security best practices.
Here's a reference from GitHub on the matter:
© 2022 - 2024 — McMap. All rights reserved.