Open Smitesh-P opened 3 years ago
We are using GITLAB + BITRISE for iOS CI/CD pipeline
As part of CI/CD step, I set env_var | | **+ https_url=https://[REDACTED]:[REDACTED]@gitlab.org.io/ios/project.git
After this step, I do run danger-swift ci steps at this step danger not able to authorize gitlab URL and it gives 401 unauthorized error. I think it may be due to GITHUB_REPOSITORY_URL need to be decoded before sending to KY process.
Error: HTTPError: Unauthorized at fn (/snapshot/danger-js/node_modules/ky/umd.js:251:12) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Ky._retry (/snapshot/danger-js/node_modules/ky/umd.js:319:12) { name: 'HTTPError', response: Response { size: 0, timeout: 0, [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
url: 'https://gitlab.com/api/v4/projects/https%3A%2F%2F[REDACTED]%3A[REDACTED]%40gitlab.project_domain.com%2Fios%2Fproject_name/merge_requests/1234/changes', status: 401, statusText: 'Unauthorized', headers: [Headers] }
}, description: '401 Unauthorized' }
May be decode url as it may possible git env variables return encoded URL.
This feels like it needs more info to be understood, can you write a more detailed issue please?
@Smitesh-P how did u resolve this issue. Even I'm facing this issue in my project ?
We are using GITLAB + BITRISE for iOS CI/CD pipeline
As part of CI/CD step, I set env_var | | **+ https_url=https://[REDACTED]:[REDACTED]@gitlab.org.io/ios/project.git
After this step, I do run danger-swift ci steps at this step danger not able to authorize gitlab URL and it gives 401 unauthorized error. I think it may be due to GITHUB_REPOSITORY_URL need to be decoded before sending to KY process.
Error: HTTPError: Unauthorized at fn (/snapshot/danger-js/node_modules/ky/umd.js:251:12) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Ky._retry (/snapshot/danger-js/node_modules/ky/umd.js:319:12) { name: 'HTTPError', response: Response { size: 0, timeout: 0, [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
}, description: '401 Unauthorized' }
May be decode url as it may possible git env variables return encoded URL.