Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to authenticate with the Confluence server using sphinxcontrib.confluencebuilder

Divyank Mahalle October 26, 2021

Hello, I'm trying to publish a sphinx project on a space "DOCS" and page "API Documentation" on confluence cloud, with the sphinxcontrib.confluencebuilder plugin for sphinx. I can log in with my credentials in the browser, but not via using the "make confluence" command with the same credentials. My account is not currently locked.

I am getting this error.

$make confluence
WARNING: normalizing confluence url from https://<......>.atlassian.net/wiki/ to https://<.......>.atlassian.net/wiki/
sphinxcontrib.confluencebuilder error: --- Unable to authenticate with the Confluence server. Ensure your username and password are correct. If your username and password is correct, you may need to unlock your Confluence account be re-logging in with your browser or asking your Confluence administrator for help. --- make: *** [confluence] Error 2

conf.py file-
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinxcontrib.confluencebuilder'
]

confluence_publish = True
confluence_space_name = 'DOCS'
confluence_server_url = 'https://<...>.atlassian.net/wiki/'
confluence_server_user = '<username>'
confluence_server_pass = '<password>'

 

I checked with used API Token  but still getting error.

https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

Error-
[<.......> docs]$ make confluence
Running Sphinx v4.2.0
loading pickled environment... done
sphinxcontrib.confluencebuilder error:
---
An unsupported Confluence API call has been made.
REQ: GET
RSP: 404
URL: https://<...>.atlassian.net/wiki/rest/api
API: space
DATA: <not-or-invalid-json>


conf.py file-

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinxcontrib.confluencebuilder'
]

confluence_publish = True
confluence_space_name = 'DOCS'
confluence_server_url = 'https://<...>.atlassian.net/wiki/'
confluence_server_user = '<username>'
confluence_server_pass = '<api_token>'

 

1 answer

1 accepted

2 votes
Answer accepted
Divyank Mahalle October 26, 2021

API Token method is working now, did some spelling mistake in the confluence_server_url field.

API Token able method is working fine.


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events