Teamcity - Intermittent TransportException to bitbucket - teamcity

We're using Teamcity 8.0.1 (build 27435). Having this exact same problem. Trying to connect to a bitbucket repo and getting the following exception intermittently:
Failed to collect changes, error: List remote refs failed:
org.eclipse.jgit.errors.TransportException:
https://username#bitbucket.org/myproject/project.git: -1 null
Behind a proxy server and I have added -Dhttps.proxyHost=XXX -Dhttps.proxyPort=1234 to the TEAMCITY_SERVER_OPTS environment variable. That didn't work. There was mention of trying to upgrade to Java7 on another forum but that also didn't help.
Unfortunately, we're not able to use SSH to bitbucket because of the company network rules.
Anyone solved this problem or have suggestions? Thanks for the help!

Im not sure if there a bug in Teamcity/Jgit, but HTTPS for Bitbucket is not working properly. The solution here was to use SSH, but thats not an option for me.
My solution for now is to clone the repo locally (git clone --mirror) and update it periodically in bash (git remote update). Then just point TeamCity to that local .git folder.

Related

The local repository is out of date. Make sure all changes have been pulled from the remote repository and try again

I am new to Git and I am trying to merge my branch (With_Base_Class) with the remote master branch from within Xcode.
I tried commiting and pulling in every possible order (I hope), but every time I recieve the following error:
The local repository is out of date.
Make sure all changes have been pulled from the remote repository and try again.
This is a video of me getting the error:
https://youtu.be/sEfSnnHONkU
What am I doing wrong?
Any help is appreciated.
Thanks!
Try this git command
git push origin master --force
Thanks to KinneyKare's answer, I tried simply shutting down and restarting Xcode. This worked! If you get the
The local repository is out of date.
error in Xcode, I suggest first trying to simply exiting/shutting down/and restarting Xcode. (aka: throw the big red switch if all else fails).
I just had this same issue and it ended up being a weird disconnect between Xcode and GitHub. How I fixed this was going to GitHuB and changing my password. Then authenticating again in Xcode using the new password. WORKED LIKE A CHARM!!!
git push origin NameBarche --force
I have same problem my issue is solved:
I create a new project repository remote and the previous is deleted by that way my problem is solved
Try use Merge "main" into "main"

Puppet agent: provider git is not functional on this host

I been trying to fix this for a couple of days but no succsses yet, hope you can help me out:
What I have to do is to daily clone specific branchs of the company's git repo to specific (windows) vm's on the server.
For learning matters, right now im just trying to clone the master branch in a folder on my Desktop.
Two important observations:
1 - I know that git is installed on the puppet agent
2 - The repository doesnt have passphrase and the private key (ssh) is well allocated on the windows agent.
Now the code i have:
vcsrepo{ "C:\{Name of the win agent user}\Desktop\folder":
ensure => present,
provider => git,
source =>'git#scm.example.com.br:controle_versoes.git',
}
When I run windows agent I receive the following message:
Error: /Stage[main]/Main/Node[{nameoftheagent}]/Vcsrepo[C:\User{Name
of the win agent user}\Desktop\folder]: Provider git is not
functional on this host
Any idea what the problem is or how could i fix it?
Thank you a lot!
Gustavo B. Barbosa
The error ("Provider git is not functional on this host") generally means that Puppet is unable to find the git command. If git is installed, that probably means that the command is not in a directory that is in your PATH environment variable.

Error creating git repos using Xcode/OS X Server

I recently installed OS X Server on a seperate machine and attempting to host some git repos. When I try to create a new project & remote repo with Xcode I get an error -
Could not connect to the remote repository because the server was unreachable.
If I attempt to configure it again after the project has been created I get this error -
Cannot create hosted Git repositories at path because path already exists: /Library/Developer/XcodeServer/HostedRepositories/SampleProject
Looking at the server - I can see the repos were actually created, but for some reason I can't connect/push to them. I have tried this on the machine running the server and another one on the same network with the same results. Is something not configured correctly or any way to get at a more detailed error?
Fixed it by going into the Xcode service repository settings and enabling SSH access.

Windows, Git and Jenkins

I'm just starting to look at Jenkins CI on my Windows 7 machine.
I thought for a first test I would create a git repo on my localhost which is aliased to
http://tests.local/jenkins/local
I setup a job in Jenkins, selected Git under source code management and added http://tests.local/jenkins/local.git as the Repository URL
When the job runs it fails with the error
ERROR: Error cloning remote repo 'origin' : Could not clone http://tests.local/jenkins/local.git
Is this a git issue or a Jenkins issue and how can I fix it?
Thanks
Have you run git update-server-info in your repo? This is needed if you want to clone/fetch via http. Run git help update-server-info or see online documentation here for more details.

Trouble connecting to my git repository from windows to linux

I have git installed on my local windows 7 PC. I can commit there.
I have git installed on my linux dev server. I can commit there.
I have successfully cloned to each machine a github repository. So they seem to be working in that sense. But I'd like to be able to push from my PC to the dev server.
I believe that I am missing a crucial piece of info here and can't find any tutorials, questions answered on how to set this up.
I have a few questions:
I was led to believe that I don't NEED to set up ssh keys to do this, I will just be prompted for a password.
My site was developed in php, is it possible to push to the linux server and have the live dev site continue running, with the new changes?
Here is how I'm currently trying to clone from my linux server and the response... (i changed the IP address)
C:\DevEnv>git clone 0.0.0.0:gitrepo.git
Cloning into 'gitrepo'...
fatal: The remote end hung up unexpectedly
I have a directory called gitrepo.git that has a repository.
I also tried creating a repository in the home dir of mysite.com. When I try cloning that from my PC this is what happens:
C:\DevEnv>git clone http://mysite.com
Cloning into 'mysite.com'...
fatal: http://mysite.com/info/refs not valid: is this a git repository?
I've read through many tutorials and they mostly talk about either really really basic concepts, or how to push/pull to github, or just skip over certain settings so when I follow them I get fatal: The remote end hung up unexpectedly...
Any help, point in the right direction would be most appreciated!
You may need to provide your username. For example:
$ git clone myusername#myhost.com:/opt/git/project.git
Or you could setup a samba-share on the Linux box and share your git-repo, mount the share in windows and clone it from the filesystem.
More info about setting up git on a server:
http://progit.org/book/ch4-0.html
Check path to your project.
Try to clon via git protocol:
C:\DevEnv>git clone git://0.0.0.0/gitrepo.git

Resources