How do I resolve Repository not found errors in Teamcity? - github

I've multiple projects configured exactly the same way using the same VCS root. All that changes for the projects is the project name, so to keep things DRY I share the root with the following fetch url:
git#github.com:<myorg>/%conf.GitProjectName%.git
For one single project this fails with:
List remote refs failed: cannot locate repository at git#github.com:<myorg>/<My project>.git: ERROR: Repository not found.
This is really weird and I can clone the git repo using git#github.com:<myorg>/<My project>.git without any problem. Any idea about how to debug this?

This was not due to teamcity, it was because of github's new way to give teams rights to a repository which wasn't there before I think. Didn't delete the question to help other that might have the problem.

I've failed to add two or more github reps to teamcity using the same private key. I've generated another private/public pair, added public key to github for new repo, then added private key into teamcity. This worked for me. Hope it helps.

Related

Issue with "No Staging repository found" in sonatype publish

I am using the amazing plugin sbt-ci-release but I think I am doing something wrong. I posted the whole details of all my experimentation and steps and attempt as an issue in their repo which can be find here.
To do it short, when travis is calling +publishSigned it is yelling about
java.lang.IllegalStateException: No staging repository is found. Run publishSigned first
When I tried to manually create a staging folder, it succeed without exception but did not deploy any binary and deleted the folder.
I am not sure what to try next.
Thanks.
The issue was that my branch tag was 0.1 instead of v0.1 , adding the heading v solve the problem.
See https://github.com/olafurpg/sbt-ci-release/issues/44#issuecomment-503087541

Codeship cloning another repository from one repository

I have created a repository on the codeship and push my code on that repository. I have another repository which is dependent on the this repository.When i am trying to create the build it is going to clone the another repository.I am getting access denied error.I can not add two codeship key to one project.
Can anyone please help me out for this issue?
Thank you.
do you have a build url that you could share here? Sounds like you'll need to add the CodeShip project's public ssh key to the additional repositories -- https://documentation.codeship.com/basic/builds-and-configuration/access-to-other-repositories

Laravel Forge Github Repository Error

I am trying to connect my Laravel Forge (digitalocean) server to my Github repo like I've done many times in the past, however, this time it is giving an error saying
You must specify a repository to clone.
However, when I go into the command line and do a git clone of the branch and repository, it works fine. Any ideas what might cause this? I have my SSH key for Forge added to Github already.
Thanks,
I ended up deleting the site on forge and reinstalling and it works now. Not sure exactly why it wasn't recognizing the repository, but it works now.

Can't push using EGit and Bitbucket

I've been trying to start a project using EGit with Bitbucket but I can't push the project to the repository in the server.
These are the steps I've followed (I'll try to be very specific so other people can use it as a tutorial mode; even though it's not working for me it might work for others):
1) I installed Git on Ubuntu 12.10 using this tutorial
2) Followed this tutorial for GitHub.
Start a new C++ project in Eclipse
Under Window > Preferences > General > Network Connection > SSH2 > Key Management tab, I generated a new RSA key and added it to the list of deployment keys of my repository on Bitbucket.
Right click on the eclipse project: Team > Share project ; Team > Add to index ; Team > Commit
Window > Show View > Other > Git > Git Repositories
Right click on Remotes > Create Remote > Checked "Configure push" and typed my project's name
Add Push URL: ssh://git#bitbucket.org/myuser/myrepository.git, Protocol: ssh; port: blank; user: git; password: blank
Advanced button under Ref mappings and selected the "master" version. If this step works, it means that the RSA key is configured in Bitbucket and EGit properly. Otherwise it will show a connection error.
Everything is done. However, when I press "Push" I get the following error:
ssh://git#bitbucket.org/myuser/myrepository.git: push not permitted
I've tried every configuration possible: switched to a new work space, updated Eclipse, created new repositories, re-installed Git... Any ideas?
Alright, I've finally found a way to work with it.
It's just changing the authentication mode. If the HTTPS link is used, instead of using the SSH link, everything works perfectly. It seems that SSH works just in a read-only mode.
Of course the authentication method is different: you have to type the password and the SSH keys stored in Bitbucket are no longer necessary.
For those who are having problems with EGit, I recommend following eugener's way to automatically configure EGit. Then you just have to select HTTPS as authentication mode to push the stored commits.
There is much simpler way of configuring remote Git repos in Eclipse:
Create an empty repo on BitBicket
Copy repo's URL
Clone repo to your machine using "Git Repositories" view.
Share your project into newly cloned repo.
Since a repo was cloned - remote settings were configured automatically. This means you will be able to push immediately
It might be a user name misconfiguration in .gitconfig.
Probably related, I fixed "auth fail" problems by following the instructions on:
http://wangpidong.blogspot.com.es/2012/05/how-to-use-bitbucket-with-egit-in.html
Got it from:
Configuring egit with BitBucket
In this specific case I agree with resolution from Olivier J.'s comment under original question.
But I have had similar problem and it was caused by something else. I resolved it and here is what happened:
I have been using some private repository at Bitbucket (A) with some user account and some public key (X) to access it. I have had key X loaded in my pageant Putty key chain.
Then I created a new public repository (B), also at Bitbucket with a different user account and another public key (Y). I added this key to pageant too.
When I tried to access repository B apparently public key X and not Y was used, because ..for SSH client both connections are the same - same user (git) at the same host (bitbucket.org)! And key X was used first because ..it was loaded earier? Or maybe because its name was alphabetically first? I am not sure but the result was that...
Read-only access for B using X was granted because the repository was public and any valid Bitbucket user key was enough to gain this kind of access!
..but writing (pushing) required key Y, which was not used by SSH.
So the general tip is: to resolve strange read-only git via SSH access errors check carefully which private key is actually used by SSH.
I resolved this problem by loading only one key - X or Y - in pageant at a time but I would love to do it a smarter way - please let me know in comments if you know how!
Using Bitbucket I do it this way:
create a repository in bitbucket
clone the empty repository using the https url
connect the project in eclipse to the repository using the Team -> Share option and select the location where you cloned the repo
index (stage) your project files
commit and push

Push to github in Zend Studio 9 error

I'm using Zend Studio 9.0.3 and I have a repository on github. I created a project from github on my local machine. I can commit things, but once I try to push to upstream, I get the following error:
Can't connect to any repository: https://github.com/xxxxx/xxxxx.git (An internal Exception occurred during push: https://github.com/xxxxx/xxxxx.git: insufficient data written)
Am I missing something?
Thanks in advance for any info!
(nb: replaced the actual url with xxxx - don't want anyone sniffing in it while it's in development =] )
edit:
I don't get that error anymore, but now Zend Studio thinks the master/origin repository is already up-to-date, while there are several commits waiting to be pushed.
I had simillar errors while creating two (or more) branches of code, then merging them, commit, and push. I guess this is caused by some bugs in git algorithm.
Solved the issue.
Steps I took to fix this:
Open Preferences -> General -> Network -> generate new SSH (RSA) key
Go to github, add the key to your keys
Removed the default revs settings that Zend studio made
Pushed to origin/master.
Success \o/