Page 1 of 1

Publishing to Bitbucket - works and then doesn't

Posted: Mon Mar 11, 2019 11:02 am
by sarahb
I've got a Flare project that holds all of our training content for our department. For example, we have 10 products, and the training for all 10 products is in one Flare project. This project is bound to Git (Bitbucket) and uses SSH for authentication. We have no issues pulling and pushing. It works great. I've been manually building PDF books for each training course upon request, but now am setting up daily PDF book builds that are published directly to our Bitbbucket server (same server, but new repo specifically for these auto book builds).

Here's what I've done:
1. Created a repo on our Bitbucket server to hold all these published daily builds. So one repo that the entire team can go to to see their daily builds.
2. Created a "staging" folder on my local machine where these auto-builds can initially build before they are published. This staging folder is outside of the Flare project.
3. Created a Destination in the Flare project. The destination directory is set to my local "staging" folder on my local machine. Source control points to the repo on Bitbucket I created specifically for the auto-book builds. Push to Remote is enabled and it points to origin. Login Credentials are set.
4. Enabled the destination under the Publishing tab of the Target for one of the training products.
5. Clicked Publish in that Target.
The book generates and then publishes successfully.

Now to get another training product publishing to the same repo on Bitbucket. This is where I run into problems. Here's what I've done:
1. Opened the Target for another training product.
2. Enabled the same destination I enabled for the first training product. Because I want the book to go to the same repo on Bitbucket.
3. Clicked Publish in that Target.
The book generates, but then publishing fails. Error says:
"Publish failed: Requires both username and a private key".
I've gone back to the first product and tried publishing again, and it still works. Both of these training products are using the same Destination, so why would it work for one but not the other? Can multiple targets not use the same destination? Can multiple books not be published to the same Bitbucket repo?

The SSH keys are the same ones associated with the Flare project and they work fine to push/pull. So there is nothing wrong with the keys or my password. Besides, when you set up a destination, you point to your keys and enter your login credentials, so if that destination works to publish one of the training product books, it's not possible for that same destination not to work with the second training product book.

Any ideas? This is getting frustrating.

Re: Publishing to Bitbucket - works and then doesn't

Posted: Thu Apr 02, 2020 8:59 pm
by JRtechw
Hi Sarahb,

Looks like you, me, and this guy (viewtopic.php?f=68&t=31416) are all having the same problem.

I have set up publishing to DevOps Git, which then deploys to our Azure web app through DevOps pipelines. Works fantastic, no VPN required.

However my associate writer is trying to use the same Flare destination that I created, and is getting the same error message: 'Both username and password are required'. Even though they are using the same devops repo credentials that I am.

I'd hate to think every contributor needed to create their own target in Flare just to publish. If I can't get it working, I"ll log a support ticket with MadCap and report back.

Re: Publishing to Bitbucket - works and then doesn't

Posted: Sun Apr 19, 2020 10:24 pm
by JRtechw
Hi Sarahb,

I solved my problem with the help of Madcap Support, which might help solve your problem as well. We found that if you have File > Options > Source Control > Use Git executable for Network Functions ticked in Flare options, then an author requires Git for Windows to be installed on the author's machine. Flare will run the local executable if this option is ticked. I assume that it's ticked by default when publishing to DevOps git, because I didn't turn it on.

So I just made sure that all of our contributors have Git For Windows installed, and now the executable field is populated and Flare publishes projects to git as expected.

Hope this helps.