Either your SSL and/or settings are off, or you're behind some sort of evil man-in-the-middle proxy
On Tue, 4 Jul 2023 at 10:27, Hiero-nymo <[email protected]> wrote: > fatal: [localhost]: FAILED! => { > > "changed": false, > > "invocation": { > > "module_args": { > > "access_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", > > "api_url": https://api.github.com > <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.github.com%2F&data=05%7C01%7Cjerome.meyer%40umb.ch%7C06c7c3373c6f4344cbeb08db7c6849d4%7Caa487a7d0a994ec89a842952762a0131%7C0%7C0%7C638240559592573728%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=lH6pXaoJdWBhLn1%2B6z0B3MhqWFHRs4IdG%2BSfs%2BQJsYo%3D&reserved=0> > , > > "description": "", > > "force_defaults": true, > > "name": "testrepo", > > "organization": null, > > "password": null, > > "private": false, > > "state": "present", > > "username": null > > } > > }, > > "msg": "Unexpected error. > SSLError(MaxRetryError(\"HTTPSConnectionPool(host='api.github.com', > port=443): Max retries exceeded with url: /user (Caused by > SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify > failed (_ssl.c:897)'),))\",),)" > > } > > On Tuesday, July 4, 2023 at 10:10:59 AM UTC+2 Dick Visser wrote: > >> That's weird. >> Can you add -vvv and see what that says? >> >> On Tue, 4 Jul 2023 at 08:41, Hiero-nymo <[email protected]> wrote: >> >>> Tried to remove the organization parameter but another error: SSL: >>> CERTIFICATE_VERIFY_FAILED. To remedy this SSL problem (as test), I've >>> deactivated the verification with http.sslverify=false but it doesn't >>> seem to work... >>> >>> On Monday, July 3, 2023 at 5:53:09 PM UTC+2 Dick Visser wrote: >>> >>>> Try removing the organization parameter from the github_repo task. >>>> >>>> On Mon, 3 Jul 2023 at 17:39, Hiero-nymo <[email protected]> wrote: >>>> > >>>> > Hi everyone, >>>> > >>>> > I tried to create a git repository in GitHub with Ansible and I >>>> encounter two issues: >>>> > 1) I did a lot of research and didn't see much information about >>>> GitHub API Infrastructure. >>>> > 2) I can get the information about a repo but I cannot create a new >>>> one. I've tried with github_repo and uri Module without success: >>>> > >>>> > With uri >>>> > - name: create repository >>>> > uri: >>>> > url: "https://api.github.com/users/<user>" >>>> > method: POST >>>> > body_format: json >>>> > headers: >>>> > Accept: "application/vnd.github.v3+json" >>>> > Authorization: "token {{ token_perso }}" >>>> > body: >>>> > name: "{{ repository_name }}" >>>> > private: false >>>> > auto_init: true >>>> > has_issues: true >>>> > has_wiki: true >>>> > has_downloads: true >>>> > register: response >>>> > >>>> > With github_repo >>>> > - name: create repository >>>> > github_repo: >>>> > organization: <user> >>>> > access_token: "{{ token_perso }}" >>>> > name: "{{ repository_name }}" >>>> > state: present >>>> > register: response >>>> > >>>> > Unfortunately I always received a Status code 404. I've configured my >>>> token with permission too. >>>> > >>>> > "msg": "Status code was 404 and not [200]: HTTP Error 404: Not >>>> Found", "redirected": false, "referrer_policy": "origin-when-cross-origin, >>>> strict-origin-when-cross-origin", "server": "GitHub.com", "status": 404, >>>> > >>>> > As anyone an idea? >>>> > >>>> > -- >>>> > You received this message because you are subscribed to the Google >>>> Groups "Ansible Project" group. >>>> >>> > To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> > To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/ansible-project/8ea3df71-d5a1-4374-bc40-6f4e96a2e900n%40googlegroups.com. >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ansible Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/ansible-project/7af7773f-bf99-4bed-a684-13e3afa5bc0fn%40googlegroups.com >>> <https://groups.google.com/d/msgid/ansible-project/7af7773f-bf99-4bed-a684-13e3afa5bc0fn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> Sent from Gmail Mobile >> > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/25219132-fca0-4359-91d3-d9307e47cc7bn%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/25219132-fca0-4359-91d3-d9307e47cc7bn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Sent from Gmail Mobile -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF8BbLb8FeSH%2B%3Dn1X0qTG9Dt%2BKCsXoiE4wNkQ3YpDr%3DNbCLH5g%40mail.gmail.com.
