You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with this command line "md2cf --host 'https://<my secret>.atlassian.net/wiki/rest/api' --username '<my secret>' --password '<my secret>' --space <my secret> --dry-run --no-gitignore 'C:\my-project\docs'" and with
"pip install md2cf==2.0.2" it will work.
But if I then do this "pip install md2cf==2.1.0" and run the command line again I now get this error:
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Python311\Scripts\md2cf.exe_main.py", line 7, in
File "C:\Python311\Lib\site-packages\md2cf_main.py", line 384, in main
space_info = confluence.get_space(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\md2cf\api.py", line 259, in get_space
return self._get(f"content?spaceKey={space}/")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\md2cf\api.py", line 70, in _get
return self._request("GET", path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\md2cf\api.py", line 66, in _request
r.raise_for_status()
File "C:\Python311\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://<my secret>.atlassian.net/wiki/rest/api/space/<my secret>/?expand=homepage
NOTE: this url (https://.atlassian.net/wiki/rest/api/space/<my secret>/?expand=homepage) in the webbrowser print json content.
EDIT: the difference was that --dry-run is not respected in the new version. I still have problems with authentication credentials with the old version with --dry-run removed from command line.
The text was updated successfully, but these errors were encountered:
jimstein3d
changed the title
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url with md2cf v2.1.0
authentication credentials are validated even with --dry-run in md2cf v2.1.0
Apr 27, 2023
Unfortunately it's actually necessary to get space information even during a dry run: it's the only way to determine the ID of the top-level page in a space when using the --top-level argument. Before version 2.1 that was done incorrectly. I could look into possibly not allowing that option during a dry run, or at least warning the user about it.
with this command line "md2cf --host 'https://<my secret>.atlassian.net/wiki/rest/api' --username '<my secret>' --password '<my secret>' --space <my secret> --dry-run --no-gitignore 'C:\my-project\docs'" and with
"pip install md2cf==2.0.2" it will work.
But if I then do this "pip install md2cf==2.1.0" and run the command line again I now get this error:
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Python311\Scripts\md2cf.exe_main.py", line 7, in
File "C:\Python311\Lib\site-packages\md2cf_main.py", line 384, in main
space_info = confluence.get_space(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\md2cf\api.py", line 259, in get_space
return self._get(f"content?spaceKey={space}/")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\md2cf\api.py", line 70, in _get
return self._request("GET", path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\md2cf\api.py", line 66, in _request
r.raise_for_status()
File "C:\Python311\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://<my secret>.atlassian.net/wiki/rest/api/space/<my secret>/?expand=homepage
NOTE: this url (https://.atlassian.net/wiki/rest/api/space/<my secret>/?expand=homepage) in the webbrowser print json content.
EDIT: the difference was that --dry-run is not respected in the new version. I still have problems with authentication credentials with the old version with --dry-run removed from command line.
The text was updated successfully, but these errors were encountered: