Failed with error: Could not read from remote repository || git - java

I am using Intelliji Idea. When I try to push my project to github repository I getting this message for 2 times:
And then I get this message:
What I need to do to push my project?

Such issues usually occur when there is no SSH-key configured, or IDE could not find it. AS a test, check push from command line to make sure SSH access is configured correctly. Make sure you have the ssh key and it is added to GitHub. See https://help.github.com/articles/connecting-to-github-with-ssh/
The error is rather generic, unfortunately. There are request to show more details and improve error reporting - see https://youtrack.jetbrains.com/issue/IDEA-72176 and https://youtrack.jetbrains.com/issue/IDEA-168179
At the moment, when some git operation fails, you could always check a more detailed output of the git command using the Console tab of the Version Control toolwindow.

Related

The Travis CI build failed -Github

I pulled a request to a repository,but encountered a problem
"continuous-integration/travis-ci/pr — > The Travis CI build failed"
after pulled the request. I have clicked Detail and read it, but I'm unable to locate the issue and don't know how to resolve it.
Please give me suggestions.
This looks like an automated build which is triggered when you create a pull request. Normally Travis will try and build your solution or run some form of testing against your changes.
My guess is that these automated builds or tests that are run through Travis have failed due to something you have changed.
You will need to go into Travis (A CI tool) and look at the build logs of that particular pull request and from there you will be able to see what has been failing.
Sorry that I couldn't be of more help but that is a very standard error message and further detail is needed :)

How to configure Auto Commit in build step

I'm using TeamCity plugin with IntelliJ and working with the following workflow:
https://confluence.jetbrains.com/display/TCD10/Pre-Tested+%28Delayed%29+Commit
My concern is if this process can be automated in a manner that the last step which says "commit my local patch if the build succeeded" and the step will be done on the TeamCity side and not on my local laptop.
Can I add some extra step in the build that says "If the build succeeded commit this patch to SVN" (from the TeamCity server)
It just feels like the wrong way that the server needs to keep a connection with my laptop until the end of the build.
It causes a lot of commit failures due to network glitches, authentication failures, files with other revision etc.
This set up is not possible, as TeamCity is not aware of your local version control credentials and settings, that will be used during commit from the IDE.

Intelij: "Files commited" but not showing in Github?

I have built my Project using "gradlew build idea"
I linked my project to GitHub and performed my initial commit using the instructions on the Website.
However when I commit changes from my change lists it says "files commited" yet when I check my GitHub repository they are not there?
What do I need to do to configure to Intelij with my exact Repository on GitHub?
However when I commit changes from my change lists it says "files commited" yet when I check my GitHub repository they are not there?
In order to see your files on the remote repository you have to push them.
Once you commit the file are only inside your local repository.
Here is the basic flow that you will need to follow:
GitHub is a git storage website, which you use as a remote. git repos can be completely local if needed. If you have never pushed before, run:
git remote add origin https://github.com/user/repo.git
git push origin master
Don't commit using intellij. Use the command line.
git add .
git commit -m "Your commit message"
All the changes you commit are saved in Local. So, you need to push the changes from Local to Remote. For this, right click on master in Local and you can see Push option.
Please refer the attached screenshot.

How to create account on sonatype so I can publish Maven archive?

I've been running an open source project for several years now and have had periodic requests to publish it to Maven. Unfortunately, I have found the Maven publishing process to be extremely confusing and have yet to complete it successfully. I believe the last time someone did it on my behalf and it resulted in http://mvnrepository.com/artifact/com.kitfox.svg/svg-salamander/1.0
Anyhow the the project is now at version 1.0.39 while the Maven repository one is 1.0.8. I'd like to update it, and I have what I believe is a valid pom.xml file. However, when I run 'mvn deploy', I receive the error
Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
After doing some searching, it seemed like I needed to create an account on sonatype.org so that I have a place to upload the file to. However, Sonatype does not have any obvious feature on their website to let you create an account. I'm not sure if they used to but then depreciated it or if there is some other process entirely that I'm supposed to go through.

Triggering a Git fetch, reset using Jenkins

I have a Java package which is checked in Git (and code.amazon.com) and I have a Ant job to trigger the package. Within the Ant job, I have created a macrodef for Git and I am performing a git fetch and git reset so that I can get the latest codebase every time I am triggering the Ant job.
When I am triggering the Ant job using Eclipse, it is working. If I am running the Ant job from terminal using ANT –buildfile my_buildfile.xml, it is also working.
Now I have setup Jenkins on my machine and am trying to run the Ant file. Jenkins is not able to trigger the Git job in the Ant file. It is giving following error:
/rhel5pdi/workplace/bangshis/EpubYJConvPerfWorkspace/src/EpubYJConvPerfLinux/Jenkins_Linux_build_Global.xml:81: The following error occurred while executing this line:
/rhel5pdi/workplace/bangshis/EpubYJConvPerfWorkspace/src/EpubYJConvPerfLinux/Jenkins_Linux_build_Global.xml:99: Execute failed: java.io.IOException: Cannot run program "git": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
Part of this error might be due to the reason that, my Jenkins is not able to trigger the job as the current user of the host machine.
To solve this problem, I have tried taking the following steps:
Creating a global credential and using password-less account (RSA ID).
Logging into Jenkins using the same username as system.
Installing Git and Git client plugins and setting them up appropriately.
Kindly let me know if I am missing something, and if there is any way out. If my approach is not correct, I would be glad if you can share few other ideas.
I think it's related to the git configuration on your master (or node)
This solution should work to fix your problem:
Jenkins giving error while cloning from gitHub
#Dr.Bokko is correct...and I should thank him for guiding in the right direction. I am trying to give the complete answer. There are three factors based upon which we can do the setup of GIT with JENKINS.
1st Factor: To access GIT repository, if it is a public repository, then user credentials would not be required. But for access restricted GIT repositories, we need to make sure that proper credentials are passed. Git and Git Client plugins need to be installed for Jenkins to understand GIT operations.
2nd Factor: Before running the script, add a build step and export all the libraries needed as a part of the shell script.
3rd Factor: Finally check the System Configuration in Manage Jenkins section and check the environment variables which are considered by Jenkins. If they are not appropriate, then go to the nodes management link, and all the environment variables as KEY-VALUE pairs.
Hopefully, these steps mentioned above would solve the problem.
The following error appears in your stacktrace:
Cannot run program "git": error=2, No such file or directory
What that means is that the git executable is either not installed or not in the command path of the process running ANT.
It's not entirely clear why you're calling GIT from ANT. Normally Jenkins would perform the checkout of the code first (using GIT) and then call ANT. I would highly recommend investigating this alternative workflow, which might require the installation of a GIT plugin for Jenkins (can't remember if this is a default plugin or not).

Categories

Resources