hazel icon indicating copy to clipboard operation
hazel copied to clipboard

Private repo not working

Open KammererTob opened this issue 6 years ago • 6 comments

Not sure if the documenation is not accurate enough or i am doing something wrong, but i cannot get the setup to run properly. This is my command: now -e TOKEN=@github-token -e ACCOUNT="MyAccount" -e REPOSITORY="MyRespository" -e PORT="80" zeit/hazel

This is the message i get immediatly and i need to supply the password for my ssh file:

Didn't find directory. Searching on GitHub...

And this is the error i am getting after ~30 seconds:

Error! Unexpected error. Please try again later. (An unexpected internal error occurred)

What am i doing wrong?

KammererTob avatar Jan 25 '18 22:01 KammererTob

I initially closed the issue, because i thought that it wasn't possible to proxy a private repo through to the application to update, but now i read that it should indeed be possible. So additionally to the problem above: Is it possible to use a private GitHub Repository with Hazel, without needing to own a server for a proxy?

KammererTob avatar Jan 26 '18 16:01 KammererTob

I tried to debug now with a public repository and this is what it says:

[debug] Retrying: Error: An unexpected internal error occurred Error: An unexpected internal error occurred at module.exports.EventEmitter.create.deployment.retry (C:\snapshot\now-cli\dist\now.js:437:15) at at process._tickCallback (internal/process/next_tick.js:188:7) [debug] get files ready for deployment: 0.298ms [debug] v2/now/deployments: 1266.614ms [debug] Retrying: Error: An unexpected internal error occurred Error: An unexpected internal error occurred at module.exports.EventEmitter.create.deployment.retry (C:\snapshot\now-cli\dist\now.js:437:15) at at process._tickCallback (internal/process/next_tick.js:188:7) [debug] get files ready for deployment: 0.349ms [debug] v2/now/deployments: 1211.761ms [debug] Retrying: Error: An unexpected internal error occurred Error: An unexpected internal error occurred at module.exports.EventEmitter.create.deployment.retry (C:\snapshot\now-cli\dist\now.js:437:15) at at process._tickCallback (internal/process/next_tick.js:188:7) [debug] get files ready for deployment: 0.383ms [debug] v2/now/deployments: 1143.849ms [debug] error: Error: An unexpected internal error occurred Error: An unexpected internal error occurred at module.exports.EventEmitter.create.deployment.retry (C:\snapshot\now-cli\dist\now.js:437:15) at at process._tickCallback (internal/process/next_tick.js:188:7) Error! Unexpected error. Please try again later. (An unexpected internal error occurred)

Might be a problem with now rather than hazel. Hard to grasp what's going on, since the error is not very specific. I also tried to disable any firewall/anti-virus.

KammererTob avatar Jan 29 '18 13:01 KammererTob

I removed my comment because I actually succeeded, with a private repo. I use the workflow: now secret add github_token <token> then, now -e TOKEN=<github_token> zeit/hazel and... it worked.

My mistake was to include my username also in the repo name. Hence it appeared twice in the url.

onekiloparsec avatar Jan 29 '18 13:01 onekiloparsec

@onekiloparsec Yeah i think my problem is not related to the private repository since i also cannot deploy when using a public repository.

KammererTob avatar Jan 29 '18 13:01 KammererTob

I generated a token with private repo access. I am on a team that has access to our project. I was not able to deploy an update server following the workflow below, but my coworker was able to following the same steps. Sounds like a bug?

Workflow: now secret add my_token <token> now -e TOKEN=@my_token zeit/hazel

My error:

Didn't find directory. Searching on GitHub...

After a few seconds I am prompted for the passphrase to my ssh/id_rsa key. (my coworker is not asked for this)

mcverticchio avatar Jan 30 '18 22:01 mcverticchio

This issue resolve in my pull request #98 . Example for autoUpdater.ts.

import { autoUpdater } from "electron-updater";

const server = "https://hazel-xxxx.vercel.app";
const feed = `${server}/update/${process.platform}/${app.getVersion()}`;

autoUpdater.setFeedURL(feed);

backroot avatar Oct 04 '20 09:10 backroot