release icon indicating copy to clipboard operation
release copied to clipboard

Can't use release for private repository

Open praveenpuglia opened this issue 7 years ago • 8 comments

Hi!

I have used release before and it works perfectly fine for public repositories. But for private repositories I always face the following.

❯ release patch
✔ Bumped version tag to 2.0.1
✔ Created release commit
✔ Tagged commit
✔ Pushed everything to remote
Error! Could not determine GitHub repository.

Here's what the package.json looks like.

{
  "name": "joveo-tars",
  "version": "2.0.1",
  "description": "Setup for pristine Joveo Machines",
  "main": "main.js",
  "repository": "[email protected]:joveo/tars.git",
  "scripts": {
    "start": "node main.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "private": true,
  "author": "Praveen Puglia",
  "license": "MIT",
  "dependencies": {
    "chalk": "^1.1.3",
    "cli-spinner": "^0.2.6",
    "download": "^5.0.3",
    "inquirer": "^3.0.6",
    "jsonfile": "^2.4.0",
    "prettyjson": "^1.2.1",
    "shelljs": "^0.7.7"
  }
}

I am not sure why this error comes up - Error! Could not determine GitHub repository. Does release need some Auth token from github in order to work for private repos?

praveenpuglia avatar Sep 18 '18 08:09 praveenpuglia

Hi @praveenpuglia. Have you solved this problem? I am looking for a tool like this, but I would like to know if it will work for me. I am also working on a private repository.

joaolavoier-luizalabs avatar Oct 25 '18 13:10 joaolavoier-luizalabs

@joaolavoier-luizalabs nope. It still doesn't work for private repositories. I don't know if release needs a special github token to work with private repositories. Haven't got any help from any team member here too. So no idea.

praveenpuglia avatar Oct 26 '18 03:10 praveenpuglia

I see! I think this is the same issue. https://github.com/zeit/release/issues/130

joaolavoier-luizalabs avatar Oct 29 '18 14:10 joaolavoier-luizalabs

Is this still an issue? It seems to work fine ...for me... Have you tried with more than one repo?

monojack avatar Nov 23 '18 22:11 monojack

I faced this with the latest release that's 4.0.2 from 9th August.

praveenpuglia avatar Nov 28 '18 05:11 praveenpuglia

I randomly found out the solution just last week. In my case I migrated my repo into an org, which means the release app is missing permissions from the org. This link might work for you https://github.com/settings/connections/applications/08bd4d4e3725ce1c0465

https://github.com/zeit/release/issues/131

whollacsek avatar Nov 28 '18 11:11 whollacsek

I see why this is going to work but is it safe to give it the private access because this seems scary!

Full control of private repositories

Applications act on your behalf to access your data based on the permissions you grant them. Organizations control which applications are allowed to access their private data. Applications you authorize will always have access to public data in your organizations. Read about third-party access.

praveenpuglia avatar Nov 29 '18 06:11 praveenpuglia

Yeah wish there was a better solution to this

Stanzilla avatar May 29 '20 18:05 Stanzilla