fossology / fossology-python

Python wrapper for the Fossology API
https://fossology.github.io/fossology-python
MIT License
17 stars 8 forks source link

raise AuthenticationError(description, response) fossology.exceptions.AuthenticationError: ('Authentication error', <Response [404]>) #99

Closed Nandhanrajvir closed 2 years ago

Nandhanrajvir commented 2 years ago

when we tried to connect Fossology through CLI we are getting the error when we tried to import token.

please find the details below . raise AuthenticationError(description, response) fossology.exceptions.AuthenticationError: ('Authentication error', <Response [404]>)

Nandhanrajvir commented 2 years ago

img

GMishx commented 2 years ago

Hello @Nandhanrajvir , can you please check if your url to FOSSOLOGY_SERVER is correct?

For typical installation, it should be http://localhost/repo

GMishx commented 2 years ago

You can verify it by visiting <server_url>/api/v1/version and should see something like following. Note, sever url for me is http://localhost/repo

image

deveaud-m commented 2 years ago

@Nandhanrajvir I just tested the foss_cli with Fossology 4.1.0 and I get a correct configuration:

$ poetry run foss_cli config
Enter the URL to your Fossology server: e.g. http://fossology/repo
Fossology URL: http://fossology/repo
Enter Username and Password: e.g. fossy/fossy (in the default environment)
Username: fossy
Password: 
Enter a scope for your Fossology token: either 'read' or 'write'
Token scope: write
2022-09-20 14:17:36,473 - WARNING - [foss_cli.py:393] - Create a new config for fossy on http://fossology/repo with scope write
2022-09-20 14:17:36,672 - WARNING - [foss_cli.py:434] - New config has been generated in .foss_cli.ini

Please re-open the issue if you're still having issues.

deveaud-m commented 2 years ago

@Nandhanrajvir I guess you had an outdated .foss_cli.ini config file in your local folder with an invalid token.

Simply delete this file and run the command I've documented above and you should be good again.

Nandhanrajvir commented 2 years ago

Sure thanks for the support and update. Will work on it.

On Thu, 22 Sep, 2022, 2:59 pm Marion Deveaud, @.***> wrote:

@Nandhanrajvir https://github.com/Nandhanrajvir I guess you had an outdated .foss_cli.ini config file in your local folder with an invalid token.

Simply delete this file and run the command I've documented above and you should be good again.

— Reply to this email directly, view it on GitHub https://github.com/fossology/fossology-python/issues/99#issuecomment-1254767009, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2KEAZYDFUYEEOISVYEE64DV7QRGBANCNFSM555ARK4Q . You are receiving this because you were mentioned.Message ID: @.***>

Nandhanrajvir commented 2 years ago

Thanks for the update Gaurav. It is working fine now .

Thanks.

On Mon, 8 Aug, 2022, 6:23 pm Gaurav Mishra, @.***> wrote:

Hello @Nandhanrajvir https://github.com/Nandhanrajvir , can you please check if your url to FOSSOLOGY_SERVER is correct?

For typical installation, it should be http://localhost/repo

— Reply to this email directly, view it on GitHub https://github.com/fossology/fossology-python/issues/99#issuecomment-1208089262, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2KEAZ4K5TRSLHCK7G2QC2DVYD7L5ANCNFSM555ARK4Q . You are receiving this because you were mentioned.Message ID: @.***>