TeamCity Error - Unable to collect Changes - teamcity

I am getting an error in TeamCity When making a new private build. It is not picking up any changes.
The error is Failed to collect changes, error: git -c core.askpass=D:\TeamCity\install\temp\pass802548814093469879.bat -c credential.helper= ls-remote origin command failed.
exit code: 128
stderr: fatal: unable to access 'http://gitserver.xyz.com/pureohs/abc-def/': Failed to connect to gitserver.abcdef.com port 80 after 31 ms: Address already in use, VCS root: "git :: XYZ Template" {instance id=2027, parent internal id=183, parent id=GitABCXYZTemplate, description: "http://gitserver.xyz.com/abcdef/abc-def#master"}
i tried deleting the git cache, but this is not solving the problem. Please help me with the issue.
So i am trying to create a private build and get rid of this error.

Related

Exporting dependencies from package which is existing vendor

I am new to golang and glide dependency management tool. I am trying to run glide install in created my company project. I have met an error about go-xorm library.
[ERROR] Update failed for github.com/go-xorm/xorm: Unable to get repository: Cloning into '/Users/xxx/.glide/cache/src/https-github.com-go-xorm-xorm'...
remote: Repository `go-xorm/xorm' is disabled.
remote: Please ask the owner to check their account.
fatal: unable to access 'https://github.com/go-xorm/xorm/': The requested URL returned error: 403
: exit status 128
[ERROR] Failed to checkout packages: Unable to get repository: Cloning into '/Users/xxx/.glide/cache/src/https-github.com-go-xorm-xorm'...
remote: Repository `go-xorm/xorm' is disabled.
remote: Please ask the owner to check their account.
fatal: unable to access 'https://github.com/go-xorm/xorm/': The requested URL returned error: 403
: exit status 128
It's seem that I am not able to download it from github because the owner made it disabled to clone.
How can I fix this error or Is there any way to export directly from local vendor without fetching from github. I am sure that the package is already on my local vendor folder. Thank you so much!!!
This is because XORM moved from Github (repo is still available as Public Archive) to Gitea and instead of github.com/go-xorm/xorm they now use xorm.io/xorm.
I'd recommend to stop using glide completely and replace it with Go Modules based workflow; but if you must use it, you will need to remove github.com/go-xorm/xorm from your glide.yaml, add xorm.io/xorm (you can use glide get to do so) and fix your imports everywhere in codebase.

cloud build trigger based on github commits does not work

i have the following build.yaml to build an image for my project
steps:
# Build the container image with the Python version of our choice.
- name: gcr.io/cloud-builders/docker
args:
[ 'build'
, '--tag=gcr.io/$PROJECT_ID/$_IMAGE_NAME'
, '--file=./Dockerfile_pipeline'
, '.'
]
images: ['gcr.io/$PROJECT_ID/$_IMAGE_NAME']
substitutions:
_IMAGE_NAME: pipeline:latestRun
This works fine when kicked off in gcp console via
gcloud beta builds submit --verbosity debug --config build.yaml
However, when i create a cloudbuild trigger (based on commits on my repo) that kicks off my build.yaml i am getting the following error
starting build "4cc47363-32f5-4862-8533-90810c972c5a"
FETCHSOURCE
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /workspace/.git/
From https://github.com/mmistroni/GCP_Experiments
* branch 450bfce1f17042d3163e39a3ecad89d06922ea47 -> FETCH_HEAD
HEAD is now at 450bfce adding marketloader trigger
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /workspace/Dockerfile_pipeline: no such file or directory
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
What am i missing?
kind regards
marco
i found the solution after fiddling for a while
When the trigger is kicked off from github commit, the root directory is the root my repo, GCP_Experiments
the dockerfile instead resides in GCP_Experiments\dataflow\pipeline\Dockerfile_pipeline
So i had to do two fixes
1 - put the full path of the docker file as --file argument
2 - specify, as a PATH parameter, the directory where file resides relative to root repo, aka ./dataflow/pipeline
rgds

Go get from GCP source repositories

I'm trying to go get a repository from GCP Source repositories.
This seems to be very very poorly documented but what I tried to do was running go get source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git.
But I got the error:
go: downloading source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git v0.0.0-20210621185528-a62b060bc13d
go get: source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git#v0.0.0-20210621185528-a62b060bc13d: verifying
module: source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git#v0.0.0-20210621185528-a62b060bc13d: reading https://sum.golang.org/lookup/source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git#v0.0.0-20210621185528-a62b060bc13d: 410 Gone
server response:
not found: source.developers.google.com/p/[MY-PROJECT]/r/[MY_REPO].git#v0.0.0-20210621185528-a62b060bc13d: invalid version: git fetch -f origin refs/heads/:refs/heads/ refs/tags/:refs/tags/ in /tmp/gopath/pkg/mod/cache/vcs/3eb4fda67ba3d1beb54fafd4a7594a34c06a66c44b1ffd91759a1b7362ecfa4d: exit status 128:
fatal: unable to connect to source.developers.google.com:
source.developers.google.com[0: 173.194.200.82]: errno=Connection refused
source.developers.google.com[1: 2607:f8b0:4003:c0d::52]: errno=Connection refused
How can I make it work?
Fixed by adding GOPRIVATE=source.developers.google.com. Seems that go mod was trying to use a public connection which was being refused by Source.

SSH-deployer fails with auth fail error message - Teamcity for scp?

I have a build in Teamcity with the SSH-deployer, but it fails with Auth fail. I am using password authentication, don't wanna use private/public key authentication as it won't be robust approach for us.
Idea is to authenticate via user name and password.
Attached the screenshot for the configuration.
Thanks
Error message:
[06:16:14]Collecting changes in 1 VCS root
[06:16:14][Collecting changes in 1 VCS root] VCS Root details
[06:16:14][VCS Root details] "DE_Automation" {instance id=40631, parent internal id=7496, parent id=Abc_DeAutomation, description: "ssh://git#<server_name>/abc/puppet.git#refs/heads/master"}
[06:16:15]Clearing temporary directory: /opt/teamcity/temp/buildTmp
[06:16:15]Publishing internal artifacts
[06:16:15][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[06:16:15][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[06:16:15]Checkout directory: /opt/teamcity/work/376a4e836d9c66e4
[06:16:15]Updating sources: server side checkout
[06:16:15][Updating sources] Using vcs information from agent file: 376a4e836d9c66e4.xml
[06:16:16][Updating sources] Building incremental patch for VCS root: DE_Automation; checkout rules: =>; revision: d88b7e07953108a1a4c392887c28e9b97ce31a5b --> d88b7e07953108a1a4c392887c28e9b97ce31a5b
[06:16:16][Updating sources] Repository sources transferred
[06:16:16]Step 1/3: Command Line
[06:16:16][Step 1/3] Disabled build step Command Line is skipped
[06:16:16]Step 2/3: SFTP (FTP Deployer)
[06:16:16][Step 2/3] Disabled build step SFTP (FTP Deployer) is skipped
[06:16:16]Step 3/3: SCP (SSH Deployer)
[06:16:16][Step 3/3] com.jcraft.jsch.JSchException: Auth fail
[06:16:16]
[Step 3/3] com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:512)
at com.jcraft.jsch.Session.connect(Session.java:183)
at jetbrains.buildServer.deployer.agent.ssh.SSHSessionProvider.<init>(SSHSessionProvider.java:102)
at jetbrains.buildServer.deployer.agent.ssh.SSHDeployerRunner.getDeployerProcess(SSHDeployerRunner.java:44)
at jetbrains.buildServer.deployer.agent.base.BaseDeployerRunner.createBuildProcess(BaseDeployerRunner.java:47)
at jetbrains.buildServer.agent.impl.runner.CallRunnerService.doCreateBuildProcess(CallRunnerService.java:71)
at jetbrains.buildServer.agent.impl.runner.CallRunnerService.createBuildProcess(CallRunnerService.java:47)
at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:47)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:43)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:70)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:50)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:288)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:53)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:252)
at java.lang.Thread.run(Thread.java:748)
[06:16:16][Step 3/3] Step SCP (SSH Deployer) failed with unexpected error
[06:16:16]Publishing internal artifacts
[06:16:16][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[06:16:16][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[06:16:16]Build finished
In my case, the problem was not related to SCP (even when TC was saying it is) at all:
My steps:
compile
SCP deploy
some cleanup
shh script on remote server
And step 2 was failing with the same error message as you (but when i SSH to remote server, the file was here)
But, the problem was not in failing step #2 but two steps ahead - i had wrong user in step #4!
Looks like some sort of async bug.

GitHub for Mac crashes on open because of local repository issue

I am trying to figure out why my GitHub for Mac crashes on start when I choose a local repository. I added this local repository from a folder I had cloned. Unfortunately, I was playing around with the git command line and I must have done something to corrupt the local repository.
Now my GitHub for Mac is trying to access this corrupted repository on reopen and I can't change it within the program before it crashes. I would rather not purge the system of files because I have other repositories saved in GitHub for Mac.
How exactly would I be able to solve this issue or delete the reference to this local repository that is causing me massive issues? I have attempted to get an answer from the people at GitHub but they have not responded to me yet. Thank you. The error I am getting is below.
*** Terminating app due to uncaught exception
NSInternalInconsistencyException', reason: 'Received error from <RACDynamicSignal: 0x600000e3dca0> name: in binding for key path` "headerContentViewModel" on <GHChangesViewModel: 0x600000129420>:
NSError { domain: GTGitErrorDomain, code: -12, description: "Failed to create reference to tracking branch from <GTBranch: 0x600000e20c00> name: refs/heads/master, shortName: master, sha:
b5db93cacaf51cde5ad27c605c4bdb114cd23605, remoteName: (null), repository: <GTRepository: 0x60000041b4e0> fileURL: file:///Users/name/Desktop/personalWebsite/", underlying error: NSError { domain:
GTGitErrorDomain, code: -12, description: "'https://github.com/name/git.git' is not a valid remote name." } }'
terminating with uncaught exception of type NSExceptionabort() called
I had this same problem, the source turned out to be an incorrect line in my .git/config file.
The master branch had these lines:
[branch "master"]
remote = git#github.com:/.git
which matched most of the url value for the [remote "origin"] line.
Changing the line to this:
remote = origin
Fixed the problem immediately, and no more "Unable to create tracking branch" errors like I've had for quite some time.
Be sure to make a copy of that line in case it doesn't work.
GitHub support verified that this was the correct solution - at least in my case.
It looks like you've changed the config file, specifically for the repo location. If you're not able to repair the git config file yourself, can you do cat ./.git/config for us?

Resources