Как опубликовать проект на Github
Если вы не хотите потерять ваш проект и сохранить его на будущее, то удобно опубликовать его на GitHub.
Кроме того это полезно научиться делать, т.к. в реальном мире разработки системы хранения изменений в проекте используются повсеместно, поэтому начать знакомиться — полезно.
И т.к. вы представляете проект на конференции — то вам надо это сделать и добавить ссылку в конце презентации.
Регистрируетесь
Публикуете проект
1) Открываете проект в IDEA
2) Жмете сверху VCS -> Import into Version Control -> Share project on GitHub (или Git -> Github -> Share project on GitHub)
3.5) Если при логине вы получаете ошибку “Invalid authentication data. 404 Not Found — Not Found”, то попробуйте:
- в окне логина сверху справа Use Token, затем Generate — Ok на странице github (для создания токена для логина)
- скопируйте токент (длинная строка)
- вставьте его в поле в IDEA — теперь должно залогинить
4) Если снизу справа появилась ошибка “Can’t finish GitHub sharing process … initial push failed”, то:
5) VCS -> Git -> Remotes
6) Нажмите справа на карандашик и замените URL на https://USERNAME:PASSWORD@github.com/USERNAME/REPOSITORYNAME.git (поправив USERNAME, PASSWORD и REPOSITORYNAME)
7) Теперь сделайте push еще раз: VCS -> Git -> Push… -> Push
Сохраняйте в репозитории новые изменения (коммитьте их)
2) Жмите не на Commit , а на стеролчку справа и там — Commit and Push.
3) Если вы все же сделали обычный Commit , то просто выполните еще и это: VCS -> Git -> Push… -> Push
Чтобы посмотреть изменения которые вы ранее делали
1) Снизу слева жмете “9: Version Control”
2) Чуть повыше жмете Log (правее от Version Control: Local Changes Console)
3) Можете выбрать любой коммит, справа выбрать файл и нажав на него правой кнопкой и там Show Diff — увидите изменения в файле
А чтобы посмотреть какие локальные изменения вы сделали до сих пор — вместо Log вам нужно нажать на Local Changes
Убедитесь что вы не забыли закоммитить в том числе картинки
Если у вас есть картинки в проекте, то стоит их тоже закоммитить. Например можете рядом с папкой src создать папку data и складировать всё туда.
Чтобы было проще запускать ваш проект на другом компьютере или через миллион лет найдя репозиторий — как минимум измените пути картинок на относительные (т.е. с C:\\Users\\. \\image.png на data\\image.png ) и при запуске игры в идее убедитесь что в Run -> Edit Configurations. в запускаемом вами файле указана Working directory: равная пути к папке с вашим проектом, т.е. чтобы относительно этой рабочей папки ( Working directory: ) картинки действительно были доступны по пути data\image.png .
Еще лучше если вы соберете последнюю версию вашего проекта в самодостаточный .jar -файл и опубликуете его как релизную версию вашего проекта, подробнее здесь.
Сделайте описание вашего проекта
Чтобы сделать описание вашего проекта например в таком стиле — после публикации и изначального push -а:
1) Откройте ваш репозиторий на GitHub.com в браузере
2) Проверьте что вы залогинились
3) Нажмите сверху и немного правее чем исходные файлы кнопку Create new file (левее зеленой кнопки Clone or download )
4) Укажите названием файла README.md и обратите внимание что по мере редактирования файла вы можете посмотреть как он выглядит — достаточно переключиться на Preview , а потом обратно на Edit new file
5) Этот файл можно писать на языке разметки Markdown, что-то о нем можно почитать тут — Mastering Markdown.
Как вариант вам предлагается воспользоваться таким шаблоном:
# AngryBirds — большие буквы отделенные чертой от последующего текста
 — картинка из вашего репозиторий лежащяя по пути screenshots/screenshot1.png (текст в квадратных скобочках — описание которое появится если картинка не прогрузится)
**W** — сделает текст внутри звездочек выделенным
[Intellij IDEA](https://www.jetbrains.com/idea/) — ссылка ведущая на указанный адрес в интернете, но показанная как синяя надпись с текстом из квадратных скобок
Как скомпилировать проект в самодостаточный .jar -файл и опубликовать его в папку https://github.com/USERNAME/REPOSITORYNAME/releases — смотрите здесь.
Несколько примеров с неплохим описанием из которых можно вдохновиться хорошими идеями и примерами Markdown-разметки:
Can't finish github sharing process [duplicate]
I’m trying to share one of my IntelliJ projects on GitHub, but whenever I try to do that, I get an error that says it successfully created the project but initial commit failed. It gives me instructions on how to fix this, but I have no idea what the instructions mean. Can anyone decipher the error and tell me what to do?
Here is the error:
1 Answer 1
Basically, before you can create a commit, git needs to know who you are and how to refer to you. To tell git who you are, run the following commands.
Set the user name:
After that you will be able to create commits. Probably you can just rerun whatever you did that lead to this error.
Why PyCharm Fails to Complete GitHub Sharing and How to Address It
PyCharm is a powerful Integrated Development Environment (IDE) for Python coding. One of its features is the ability to share code with GitHub, a web-based hosting service for version control using git. However, sometimes PyCharm fails to complete the GitHub sharing process due to various reasons. In this article, we’ll explore some of these issues and provide solutions to address them.
Issue 1: Invalid GitHub Credentials
The most common reason why PyCharm fails to complete GitHub sharing is due to invalid or incorrect GitHub credentials. When PyCharm prompts you to log in to GitHub, you need to provide the correct username and password or token. If you enter the wrong credentials, PyCharm will not be able to authenticate and establish a connection with GitHub. This can cause the GitHub sharing process to fail.
To address this issue, ensure that you have the correct GitHub username and password or personal access token (PAT) for PyCharm to use. You can create a PAT in your GitHub account by following these steps:
- Go to your GitHub account settings
- Click on Developer settings
- Click on Personal access tokens
- Click on Generate new token
- Give the token a name and select the necessary permissions
- Click on Generate token
- Copy the token and paste it into the GitHub login dialog box in PyCharm
Issue 2: GitHub HTTPS Restrictions
Another reason why PyCharm fails to complete GitHub sharing is due to HTTPS restrictions on the network or firewall. GitHub uses a secure HTTP protocol (HTTPS), which may be blocked by some networks or firewalls. This can cause PyCharm to fail when attempting to connect to GitHub using HTTPS.
To address this issue, you can switch to using the SSH protocol instead of HTTPS. SSH is another protocol that GitHub supports for version control. To switch to SSH, follow these steps:
- Go to your GitHub account settings
- Click on SSH and GPG keys
- Click on New SSH key
- Enter a title for the SSH key and paste the key in the Key field
- Click on Add SSH key
- In PyCharm, go to File > Settings > Version Control > Git
- Under SSH executable, select Native
Issue 3: GitHub API Issues
Finally, PyCharm may fail to complete GitHub sharing due to issues with the GitHub API. GitHub’s API is used by PyCharm to communicate with GitHub and perform version control operations. If there are issues with the API, PyCharm may not be able to complete the GitHub sharing process.
To address this issue, you can check the status of the GitHub API. GitHub provides a status page that shows the current status of their services, including the API. You can access this page by visiting https://www.githubstatus.com/. If there are any issues with the API, you may need to wait until GitHub has resolved the issue before attempting to share code using PyCharm.
In conclusion, PyCharm may fail to complete GitHub sharing due to invalid GitHub credentials, HTTPS restrictions, or issues with the GitHub API. By following the solutions outlined in this article, you can address these issues and successfully share code with GitHub using PyCharm.
Cant finish github sharing process что делать
Beginner git, encountered the following problems when making android studio upload code to github,
Can’t finish GitHub sharing process
Successfully created project ‘GitHubDemo’ on GitHub, but initial commit failed:
* Please tell me who you are. Run git config –global user.email “[email protected]” git config –global user.name “Your Name” to set your account’s default identity. Omit –global to set the identity only in this repository. fatal: empty ident name (for ) not allowed during executing git -c core.quotepath=false commit -m “Initial commit xxx” –
After some searching, I finally found a solution:
setting—>Version Control —->Github Remove the item Clone git repositories using ssh
Intelligent Recommendation
![]()
Android Studio upload GitHub
Android Studio upload GitHub Since I often forget the operation steps when using the command upload, I have to check it again every time, so I found a convenient method and recorded it. premise Git in.
![]()
Use Android Studio to upload the code to GitHub
1. Set SSH Key to gitHub See ssh key Mac: open .ssh below the input terminal, and then to open the file with Notepad id_rsa.pub copied inside ssh key Find SSH and PNG Keys in setting GitHub page insid.
![]()
ubuntu Android Studio upload code to github
1. Test local git File->Settings->Git Path to git executable:/usr/bin/git test 2. GitHub configuration Fill in the username and password and test whether you can connect 3. Create a local git re.
![]()
Upload the android studio code to github step by step.
This article only pays attention to the success of code upload, and does not explain what is git, what is github, and what are the advantages of git. 1, first create an android application, Step 2: Cr.
![]()
Git uses Xcode to upload code to GitHub
Dear viewers, SVN OR is often used as a program.GitAwkward, because the company has been using SVN, I have never used Git, and recently I used Xcode to upload code to GitHub. First, Git configuration .
More Recommendation
![]()
Windows uses git to upload code to Github
Windows uses git to upload code to Github 1. Install git, create a warehouse, configure ssh Download address: https://git-scm.com/downloads Choose your own system to download, install directly to the .
![]()
IDEA uses git to upload code to GitHub
IDEA uses git to upload code Initial upload of a new blank warehouse on GitHub Upload all code of the project Upload the specified file Initial upload of a new blank warehouse on GitHub GitHub officia.
![]()
Windows uses git upload code to Github
Windows uses git upload code to Github: Tip: Git some major commands: The premise is that Git has been downloaded and registered Github 1. Local and Github connection configuration (enter the project .
AS Upload Project to Github Announced Can’t Finish GitHub Sharing Precess.
Error message can’t finish GitHub sharing precess Successfully created project ‘TestDemo’ on GitHub, but initial commit failed: * Please tell me who you are. Run git config –gl.