Publishing a Project on GitHub - github

I want to use this way to upload my project to GitHub (Source):
To publish you project sources on GitHub
On the main menu, choose VCS | Import into Version Control | Share
Project on GitHub .
If you have registered login and password,
PhpStorm establishes connection with GitHub using these credentials.
If you have not registered your GitHub credentials in PhpStorm, the
Login to GitGub dialog box. Specify your GitHub login and password or
create an account there.
Upon establishing connection, the Share
Project on GitHub dialog box opens. Specify the name of the repository
to store your project sources in. By default, PhpStorm suggests the
name of the current project. Provide a brief description of the
project functionality. Click the Share button. PhpStorm initiates
creation of the new repository on the GitHub and uploads the project
sources to it.
First step works, added my GitHub login data, test the connection and it works.
Now upon step 2, after clicking the Share Project on GitHub link this error shows up:
Error Running Git.
Cannot run program "git.exe": CreateProcess error=2, The system can not find the file specified
What do I need to do to make this work?

The OS is seemingly Windows but what version?
This might be what you need tough: I can't find my git.exe file in my Github folder

Related

IntelliJ & GitHub: How to create an organization-based repository

I am a noob at both GitHub and IntelliJ, please answer in that context and be patient.
GOAL:
I need to create a repository for my IntelliJ project in my organization, not my personal account, and be able to Admin it.
NOTE: I do NOT have admin rights for the organization, but I can create projects on it through the GitHub interface and setup a team for it with Admin rights. So, the goal should be feasible.
PROBLEM:
I am using IntelliJ (and its integrated GitHub support, not a separate windows github app install).
When I use the IntelliJ "Share the Project on GitHub" I am not given the option to choose whether to place the repository in the organization, it automatically places it in my account's list of repositories.
Then if in the GitHub website I try to transfer ownership from my account to the organization, it moves it but I lose all Admin rights. I tried to add a team I defined in the organization as collaborators to see if I could grant myself Admin rights through the team before I transfer ownership but the team does not appear.
2nd (related) PROBLEM:
Files committed from IntelliJ show as successful in IntelliJ but do not display in the Code section of the GitHub website. The message in that page mentions creating or uploading a file even though in theory IntelliJ did that.
QUESTION:
Is IntelliJ's GitHub integration usable, especially for organization-based repositories? Or should I install the windows command-line GitHub app and do all of my version control from there?
If the first, is there a good tutorial for creating org-based repositories in IntelliJ?
SOLUTION (I figured it out):
Create the project repository inside the organization.
Click on the repository to open it. Copy the URL.
In IntelliJ create a new project from VCS. Past the URL and hit CLONE.
Add your project contents, commit and push.
Much simpler than I expected... once figured out.

Azure Data Studio failing to authenticate to github

How can I get Azure Data Studio (ADS) to log into github?
Last year it was connected, after I somehow input a "Personal access token". But, that recently got messed up, and now I can't recreate the steps from last year. Now, after opening my local folder in ADS (which was a previous clone of my github folder), I attempt to Push/pull 2 commits to github. ADS prompts that the extension wants to sign into github, which I "Allow". That redirects me to an Internet Explorer page to "Continue", which should authorize the connection. However, the IE browser always responds "Oh no! An error occurred! Please restart the sign in process from the editor. Forbidden"
I think I need to (re)install a Personal Access Token into ADS, but I can't figure out how. Or, maybe there's some way to get the IE page to allow the process to Continue?
I would do the following:
Update Git on your desktop to the latest version
Start Azure Data Studio
Select a new folder, File > Open Folder
Click on source control on the left pane (ctrl+shift+g)
Click on Initialize
Create a new file and add a simple script select ##Version
Save the file and click on the plus sign to stage it
Commit and add a comment to the commit
On github, go to settings > Developer > Personal Access Tokens
Generate the token save it as you will not see it again once you leave the page
Create a new repository and copy the link
Go to AzureDataStudio, in source control, click on the three dots and select ADD Remote
13.Add Git Link you copied in step 11
14.Add the name
15.Add the token, you saved and copied on step 10 and you should now be able to authenticate with no errors
After the above steps, I was able to create and link new repos with no issues.
Moreover, I didn't need to use the PAT again but keep it handy and save it as you would do with a password.

Project is already on GitHub

I tried to share my Java project via IntelliJ to GitHub. In this case I choose VSC/Import into Version Control/Share Project on GitHub and go through few windows. But at one where I should provide repository name and its description I cancel the operation. But the repository was shared... So I removed it via GitHub webpage. I tried share it one more time via IntelliJ, but I get Project is already on GitHub info. How can I solve this situation?
Go to your project physical location and find .git folder(hidden, right click open in new window, if you have problems on mac). You might need figure out how to show hidden folders/files on your OS.
Find file "config"
Delete section(s) [remote "name"]
Try to share again
Enjoy )
Then manage remotes
then delete here

Push eclipse project to GitHub with EGit

I am successfully pushing my project to GitHub using EGit. My repository is called HelloWorld. My project in eclipse is also called HelloWorld. My problem is when i push the project it is upload the project under the folder HelloWorld. So the result is the repository HelloWorld then the folder HelloWorld and the the src folder. To be more understandable here is the link of the project. I want under the repository HelloWorld to have the src folder. How can I achieve that?
The key lies in when you create the project in eclipse.
First step, you create the Java project in eclipse. Right click on the project and choose Team > Share>Git.
In the Configure Git Repository dialog, ensure that you select the option to create the Repository in the parent folder of the project..
Then you can push to github.
N.B: Eclipse will give you a warning about putting git repositories in your workspace. So when you create your project, set your project directory outside the default workspace.
Simple Steps:
-Open Eclipse.
Select Project which you want to push on github->rightclick.
select Team->share Project->Git->Create repository->finish.(it will ask to login in Git account(popup).
Right click again to Project->Team->commit.
you are done
I use these Simple Steps when I already have committed locally a new project:
Open github.com and sign in and create a new repository.
Copy URL of the new repository.
Open Eclipse.
Select Project which you want to push on github->rightclick.
select Team->share Project->Git-> "push branch '' ...".
Follow the wizard until it finishes.
I have the same issue and solved it by reading this post, while solving it, I hitted a problem: auth failed.
And I finally solved it by using a ssh key way to authorize myself. I found the EGit offical guide very useful and I configured the ssh way successfully by refer to the Eclipse SSH Configuration section in the link provided.
Hope it helps.
If you ever face an authentication issue in any IDE - Eclipse, sts, etc. Simply while creating a remote repository select ssh protocol it won't ask you any username or password. (But will create a file ed25519 on your system which will be having an ssh key). Now you can push or do other activities using IDE without having any authentication issues.
In case of Git bash use command $ssh-keygen (ask for file give proper file path)
suppose you give name as y.pub.
Run the command $cat y.pub
copy the ssh key(starting something as ssh-rsa...) and paste in GitHub(opened in browser your remote repository)
now type command $ssh -t git#github.com
If you get an error while using the above command changed the command to
$ssh-keygen -t ed25519 -c "your userid"
then open the file by using $cat ed25519.pub file
copy the ssh key & paste into Github. Now you are authenticated to perform the various operations.
The other option if you want to use https only is to generate pat(personal access token).go to github-go to settings-go to developer settings-go to personal access token.If you aready had token delete it else click on generate new token.Give anything in note.Click on repo (you can select multiple options too) click generate token.Copy the token and now in your ide instead of password use the token.I hope it will solve your problem.

Possible to Connect Netbeans with GitHub?

I know the Git integration is Netbeans 7.0 is new and under development, but has anyone had success on pushing/pulling to GitHub?
When I click Git->Push the remote repository url shows up correctly under Step 1. Configured Repository.
But is just stays stuck on " Connecting to repository". It also pops up a box saying "Specify Git repository location" with the exact same url , clicking OK does nothing.
If instead I choose "Specify Git Repository Location" I eventually get an error, "Cannot connect to the remote repository at git#github.com:username/..."
ps. I am aware of the other similar stack questions but they are confusing, one person mentions that he was able to do this, while others mention is not yet possible to use a remote Git connection.
I have had the same issue.
And now it works fine for me.
I have done this:
1 With CLI ( Terminal for me) Define your remote repo :
cd yourlocalfolder
git remote add origin git#github.com:username/repo.git
2 Open Netbeans (7.1 for me)
Go to Team > Git > Remote > Push
3 You should see your remote repo preselected
4 in Private /public key browse to your rsa file
usr/username/ssh/id_rsa
5 Click on Next
6 Done
You need check 'Specify Git Repository Location:'
'Repository URL:' https://github.com/<your username>/<yourGitFile>.git
'User:' <your username>
But is just stays stuck on " Connecting to repository". It also pops up a box saying "Specify Git repository location" with the exact same url , clicking OK does nothing.
I faced the exact same issue and after I did some research I found that the problem was with the password.
GitHub isn’t accepting passwords for Git operations anymore.
So instead of using a password, Github suggests using Personal Access Token.
Go to your Github account settings.
Go to Developer settings in the sidebar.
Go to Personal access tokens.
Generate new token.
Make sure to check repo scope checkbox to access your repositories.
After you get your access token you can copy it and past it in the password field in the "Specify Git repository location" window and try to push your project.