Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo Gradle build fails with “fatal: No names found, cannot describe anything"


I've inherited a Bamboo build that runs deploys on a remote agent. When I run it, the build in Bamboo is marked as "successful," but the deploy task is eventually skipped due to a fatal exception - here's a snippet of the logs:

build   17-Jan-2019 10:25:33    Starting a Gradle Daemon (subsequent builds will be faster)
build   17-Jan-2019 10:25:39    :cleanPackage UP-TO-DATE
build   17-Jan-2019 10:25:39    :copyFiles
build   17-Jan-2019 10:25:39    diffTarget: SIT
error   17-Jan-2019 10:25:39    fatal: No names found, cannot describe anything.
build   17-Jan-2019 10:25:39    build.gradle
build   17-Jan-2019 10:25:39    :deploy SKIPPED
build   17-Jan-2019 10:25:39    
build   17-Jan-2019 10:25:39    BUILD SUCCESSFUL


The Bamboo build is setup to check out a repository, then run a task called deploy:




It looks like the issue may be happening when checking out the repository (I am completely new to Gradle, so would be happy to even have this validated/refuted). One other thing to note is that in the build.gradle file, I have Bitbucket creds, but I intentionally switched bewteen invalid credentials and working credentials, and the output was the same - so I'm thinking it's not something specific to this repository itself.

Does anyone have any suggestions/where I should look to troubleshoot? Anything is helpful, even if it's validating that this is likely a Git config issue, and not something else. Let me know if there's any other information I should include - like I said, I'm a total novice with this :)

2 answers

1 accepted

0 votes
Answer accepted

To anyone that stumbles across this, the issue had nothing to do with Bamboo itself - the Gradle script was making a `git describe --tags` call, but the repository had no tags defined.

(I failed to include the necessary Gradle snippet in the original question, here it is for reference):

result = exec{
commandLine "git", "describe", "--tags", "--match", "$diffTarget-*", "--abbrev=0"
standardOutput = stdout
ignoreExitValue = true
0 votes

Hi @Brian Mansfield,

I was searching for that error

No names found, cannot describe anything.

and found that could be related to a shallow clone configuration in repository configuration. Do you mind checking the repository configuration for this plan and making sure you have the option [ ]Use shallow clones unchecked?

Other question:

Have you tried to run the same gradle build from outside Bamboo (on server terminal) to make sure this problem is only happening when you run within Bamboo?

I really appreciate you answering - "use shallow clones" was unchecked, yes. It wasn't a problem with Bamboo - the build script was making a `git describe --tags` call, but the repository had no tags defined.

Like Daniel Santos likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

204 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you