Как связать pycharm с github
Перейти к содержимому

Как связать pycharm с github

  • автор:

GitHub

To be able to retrieve data from a repository hosted on GitHub, or share your projects, you need to register your GitHub account in PyCharm.

If you do not want to specify your credentials each time you sync with a remote, or push your commits, you can configure PyCharm to save your account information (refer to Configure a password policy).

Register an existing account by signing in to GitHub

  1. Press Control+Alt+S to open the IDE settings and then select Version Control | GitHub .
  2. Click .
  3. Select Log In via GitHub .
  4. Enter your GitHub credentials in the browser window that opens. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application.

Register an existing account with a token

Adding GitHub account with token

  1. Press Control+Alt+S to open the IDE settings and then select Version Control | GitHub .
  2. Click .
  3. Select Log In with Token .
  4. Do one of the following:
    • If you already have a token, insert it in the Add GitHub Account dialog window:
    • If you want to obtain a new token, click Generate . Enter your GitHub credentials in the browser window that opens. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application. In the token generation page, make sure that the repo , the gist and the read:org scopes are enabled (refer to Understanding scopes). Click Generate token , copy the token, and paste it into the Add GitHub Account dialog window.
  5. Click Add Account

See Creating a personal access token for more details on GitHub tokens.

Update an expired token

  1. When your token expires, you see the following warning when trying to push changes to the GitHub repository: Expired token warningClick Use Token .
  2. Do one of the following:
    • If you already have a token, insert it in the Log In to GitHub dialog window: Adding GitHub account with token
    • If you want to obtain a new token, click Generate . Enter your GitHub credentials in the browser window that opens. If you have two-factor authentication enabled, you will be asked to enter a code that will be sent to you by SMS or through the mobile application. In the token generation page, make sure that the repo , the gist and the read:org scopes are enabled (refer to Understanding scopes). Click Generate token , copy the token, and paste it into the Log In to GitHub dialog window.
  3. Click Log In

Create a new GitHub account

  1. Press Control+Alt+S to open the IDE settings and then select Version Control | GitHub .
  2. Click .
  3. Select Log In via GitHub .
  4. In the browser window that opens, click Create an account and complete the registration process on GitHub.
  5. Return to the PyCharm settings, click Cancel , and then repeat steps 2 and 3.
  6. Click Authorize JetBrains in browser.

Manage multiple GitHub accounts

You can use multiple GitHub accounts in PyCharm: for example, a personal account to work on an open-source project, and a corporate account for your main job.

  1. Press Control+Alt+S to open the IDE settings and then select Version Control | GitHub .
  2. Use the button to add as many accounts as you need.
  3. (Optional) To set an account as a default one for the current project, select it and click . If a default account is set, PyCharm will not ask you to select an account you want to use when you share your project on GitHub, rebase a fork, create a pull request, or create a gist.

If you cannot view pull requests in the IDE, or you get an error when you log in to a GitHub account and perform any git operation, refer to the Operations Against a GitHub Repository Are Failing article for troubleshooting tips.

Как подключить репозиторий GitHub к PyCharm?

Заранее извиняюсь если глупый вопрос, я только учусь программировать.

Столкнулся с тем что не могу подключить PyCharm к своему приватному репозиторию на GitHub. При этом, свои открытые репозитории хорошо подключаются.

605cb491ca2ca460236114.png

Вот мои репозитории на GitHub:

605cb4e8c3e0d272841122.png

А вот в PyCharm:

Нет репозитория «Hamsterkauf / chatbot_django»
Подскажите, в какую сторону копать?

  • Вопрос задан более двух лет назад
  • 5846 просмотров

1 комментарий

Простой 1 комментарий

Добавление проект в репозиторий

Вы можете добавить проект в репозиторий, чтобы сделать его доступным из этого репозитория.

В репозитории можно отображать необходимые проекты. Можно вывести только те проекты, владельцы которых являются владельцами репозитория.

Чтобы участники репозитория могли увидеть проект, для них должна быть настроена видимость. Дополнительные сведения см. в разделе «[AUTOTITLE» и «Управление видимостью проекты](/issues/planning-and-tracking-with-projects/managing-your-project/managing-access-to-your-projects)».

  1. На портале GitHub перейдите на главную страницу своего репозитория.
  2. Щелкните

Снимок экрана: вкладки репозитория. Вкладка

Projects.

Настройка PyCharm + GitHub

введите сюда описание изображения

Как создать и настроить синхронизацию репозиториев GitHub с PyCharm. Гугл внятных ответов не дает (может плохо искал). Как правильно настроить PyCharm чтобы создаваемые проекты сохранялись в GitHub. Работаю с трех компов (на работе, дома), поэтому хочется один раз настроить, что бы пришел, сел и сразу в работу. UPD: По совету комментария ниже,посмотрел VCS и мне кажется это не то.

Отслеживать

Raharasomaha

задан 8 окт 2019 в 4:51

Raharasomaha Raharasomaha

452 1 1 золотой знак 5 5 серебряных знаков 23 23 бронзовых знака

В меню PyCharm смотрите на VCS

8 окт 2019 в 5:39

Добавил upd.И мне кажется это не то.

8 окт 2019 в 5:52

VCS/Checkout from Control Version/Git [1] — указываете ссылку на репозиторий гитхаба, если нужно авторизуйтесь, проект будет скачан локально вместе с гит, что позволит обновлять, коммитить и т.п. Если у вас уже есть локальный проект и нужно на гитхаб отправить, то VCS/Import into Version Control/Share project on Github . А так, на всех машинах нужно завести локальный репозиторий [1] , как начинаете работать, вызываете обновление проекта, чтобы синхронизировать локальный репозиторий и тот, что на гитхабе. Как заканчиваете работать, делаете commit и push, чтобы на гитхаб отправить изменения

8 окт 2019 в 5:58

Если у вас до сих пор не было локального репозитория, то VCS/Import into Version Control/Create git repository

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *