I'm trying to achieve Github repo transfer (on both private and public repos) via their REST API. For this I have tried the below options
With Github App and Oktokit
const app = new App({ appId: <App_Id>, privateKey: <Private_Key>, });
const octokit = await app.getInstallationOctokit(<Installation_Id>);
let data = await octokit.request("POST /repos/{owner}/{repo}/transfer", { owner, new_owner, new_name })
Error: "Resource not accessible by integration"
Github PAT token and Octokit
const octokit = new Octokit({auth: "<PAT_Token>"});
const response = await octokit.rest.repos.transfer({ owner, repo, new_owner });
Error: "Resource not accessible by personal access token"
- Tried with Plain curl URL as well; however no luck, similar error response.
I have given all permission for this test drive. no luck!
Am I missing anything here? I would appreciate any help on this.