How can I export & import a local project in Decision Manager? - rule-engine

I'm using Red Hat Decision Manager,
I had my projects done and I wanted to deploy it to another pc.
All I can get is a jar file but when I import it Decision Manager responded Not project found.
Hoping for any help please.
Thanks!

An additional way to export a project from Red Hat Decision Manager:
Login to Decision Central
Enter to the project that you want to export.
Click on any of the assets available in the library (this will take you to the project explorer view)
From the project explorer view, toggle the project navigation.
From the project navigation gears icon, select the Download Project option.
Now you can unzip and use the project in any other git repository.

To Export
I found a way to do it, perhaps not the best approach but I couldn't find anything better.
Here is what I did:
Find out the mountPath of the pvol from your Decision Manager - Deployment Config.
/opt/eap/standalone/data/bpmsuite, you can find the .niogit directory here.
Login to oc from your local and download the local repo from .niogit. You can use oc rsync my-pod:/opt/eap/standalone/data/bpmsuite/.niogit/myrepo.git ~/temp/. This will download the myrepo.git to a temp location on your machine.
Create a new Git repo.
From the temp myrepo.git directory on your local, add upstream origin to GIT: git remote add origin git#github.com:my-demo/test.git
Push the code: git push -u origin master
This is not straight-forward but this should do. If you, or anybody found a better way to do it, please let me know.
To Import
Login to your Decision Manager.
Click on Design
Click on three-dots on right-top corner, and select Import Project. Specify your GIT URL and authentication (if any).

Related

Git hub project _ Learning)

I am working on a simple project to learn github. After I worked on my project in eclipse on my local computer, I pushed my project to github for other teammates. A second member of my team pulled this project from github and pushed back to github after making some changes. Now this morning I want to pull this updated project from github to my local machine (eclipse) so I can work on this updated project.
How can I pull this updated project from github to direct into eclipse on my local computer .
I am tried to do:
"git clone http://github.com/testproject/gitDemo.git" but it is not directly going to eclipse. If I save this project on my machine and then try to import into eclipse I got error message, "can not import, there is already one project exist with same name".
I did not see pull option in eclipse under:
Right click on project - team - Pull
Any suggestions??
Thank you in advance for all your help
I'll make one point that I'm not certain you do NOT understand, but as I often see this misunderstood, I'll point it out.
You should separate the notion of "git repository" and "project". When you clone a git repository from github (or bitbucket, or some central repository), you should store it in a directory tree outside of your Eclipse workspace. You then should right-click on the repository and select "Import..." to create a project from the contents of that repository.
Related to that, you should look for the "Pull" operation on the repository entry, not the project. I recommend to display the Git Repositories view on the left side, below the Package/Project Explorer, and make sure that you attempt all git operations in that view, instead of the Package Explorer view.
The only detail from your original post that I can address is the error about already having a project with that name. That error message is not ambiguous at all. You already had a project with that name. I have no idea whether that project was a copy of the repository that you had somehow already imported, or whether it's an empty project, or what. You don't provide any information about that.

Egit: Right click not showing GIT commands

I can't see the GIT commands when using right click on any files in a GIT repository.
I'm using Eclipse-Luna, A fresh install, afeter trying different versions of EGIT.
Thanks,
Elyahu
Some screen shots of the preferences:
I can't see the GIT commands when using right click on any files in a GIT repository.
You must first share that local project in order to make it recognized as a Git repository.
See "How make Eclipse/EGit recognize existing repository information after update?",but don't forget, once shared, to close/reopen your project.
Then Git will be active on said project.

Integrating Eclipse and GitHub

I am in need of help in trying to setup Eclipse so that I can push my code onto my GitHub account. I've searched online and the tutorials I have found are either outdated or don't work for me.
I already have a project on Eclipse. How would I put that code onto GitHub? Would someone please add detailed instructions please. Any help is appreciated.
EDIT
As soon as I posted this question, and fiddling around with the settings I managed to get it to work! What a coincidence...
The only problem I have now is how do I set it up so that when I commit it will only select the files in the project folder? Right now it is showing all 600 files in the Package Explorer.
Alright, there are several ways of doing this. I found this to be the easiest way:
First, set up SSH2 configurations. Go to Windows->Preferences->General->Network Connections->SSH2->Key Management and Generate RSA Key. Save Key
Copy that key. You will need to go to your GitHub account settings and add the new SSH key to your account.
Now, you need to install eGit:
Next, you want to add the Git Repositories view:
Create a new Git Repository. I have already created a repository called Java. I will refer to that repo for the rest of the explanation.
After you create your repository, it should show up in the Git Repositories view. Now to add your project to the repository, right click on your project and select Team->Share Project.
Select the repository you just created. You can also use CTRL+ to select multiple projects and place them in one repository.
Now go back to your Git Repositories view. Go to Remotes . Right click and select Create Remote.
Select Change... and enter the SSH link for your Repository on GitHub.
For connection, select SSH. Then press Finish.
For Rev-mapping, select Advanced....
For Source Ref select refs/heads/master. And then press Add Spec, then select Save specifications in 'origin' configuration. Then press finish.
That's pretty much it. You can commit changes by right clicking your project - >Team->Commit...`
Push new commits to GitHub:
This is a really good explanation on how to set up Eclipse pull requests.
The current branch is not configured for pull No value for key branch.master.merge found in configuration

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.

How do I create a git repository over an eclipse project or vice versa?

I have a git repository that is just a directory tree (/myprogram/src/com/mycompany/test) with some source files. I wish to create an eclipse project around this repository. Both orders of create project in eclipse and git clone <url> <myprogram> from the command line give me a "folder already exists" error from whatever tool I use last. I could move the files manually to merge them, but it feels messy and I'm not 100% confident I know which files to touch.
How is this supposed to be done properly?
You could do it by selecting Import -> Existing Projects into Workspace, select the directory containing your project (the parent of myprgram), and check the checkbox next to your project (myprogram).
To have Git support in Eclipse, install eGit and then right-click your project, select Team -> Share Project -> Git, expand the triangle to select the existing repository and click Finish. This should give you Git annotations on your project.
Another option might be to just select Import -> Git -> Git Repository (after eGit is installed) and import your repository (but I've never done that with a local repository). See also the eGit user guide.
To resolve this I just ended up copying the git repository into a newly created project, but upon revisiting the issue I found a link here that suggests something slightly more elegant (but functionally similar).
After creating a new project, use Import -> Filesystem and Select All. In my case, my repository already had a proper /src/com/... directory structure which merged nicely into the one set up by the new eclipse project.