Forums

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

Unable to authenticate sphinx with Confluence, using MFA to login

alo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2022

Hi,

I am raising this question although I know it was answered before.

But I can't publish my sphinx documentation to confluence, having the below error of authentication.

We are using confluence server and logging in there with MFA (company id and then a message through the mobile phone with code to complete the login)

Can I publish documentation then from sphinx using the API Token or how can I achieve that?

Error:

make confluence

Running Sphinx v4.1.2

loading pickled environment... done

 

sphinxcontrib.confluencebuilder error:

 

---

Unable to authenticate with Confluence

 

Unable to authenticate with the Confluence instance. Ensure the

configured username and password are correct. If credentials appear to

be correct, the user may need to be unlocked be re-logging in with above

browser or asking an administrator of the Confluence instance for help.

---

 

make: *** [confluence] Error 2

 


conf.py

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))


# -- Project information -----------------------------------------------------

project = 'confluence demo'
copyright = '2022, Amira Imam'
author = 'Amira Imam'

# The full version, including alpha/beta/rc tags
release = '1.0'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinxcontrib.confluencebuilder'
]
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
'preamble': '',
# Latex figure (float) alignment
'figure_align': 'htbp',
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

confluence_publish = True
confluence_space_key = 'KW'
confluence_parent_page = 'Infrastructure'
confluence_page_hierarchy = True
# confluence_ask_password = True
# (or for confluence server)
confluence_server_url = 'https://confluence.vnr.de/'
confluence_server_user = 'myuserid'
confluence_server_pass = 'myapitoken'

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events