chegele / AutoGitUpdate

Update node application from git repo.
63 stars 19 forks source link

fatal: Remote branch master not found in upstream origin #14

Open josephrcox opened 1 year ago

josephrcox commented 1 year ago

[12/27/2022, 12:43:18 PM] GENERAL Auto Git Update - Current version: 1.1.5 [12/27/2022, 12:43:18 PM] GENERAL Auto Git Update - Remote Version: 1.1.8.1 [12/27/2022, 12:43:18 PM] GENERAL Auto Git Update - Updating application from https://github.com/mapleweekend/easy-reddit-downloader [12/27/2022, 12:43:18 PM] ERROR Auto Git Update - Error updating application [12/27/2022, 12:43:18 PM] ERROR Unable to clone repo https://github.com/mapleweekend/easy-reddit-downloader Error: Cloning into '../../temp/AutoGitUpdate/repo'... fatal: Remote branch master not found in upstream origin

My config:

const updateConfig = {
    repository: 'https://github.com/mapleweekend/easy-reddit-downloader',
    fromReleases: false,
    tempLocation: '../../temp/',
    ignoreFiles: ['./user_config.js', './logs/', './downloads/, ./temp/'],
    executeOnComplete: 'node index.js',
    exitOnComplete: true
}
josephrcox commented 1 year ago

I think i found the issue. I didn't have the right branch name.

BUT now I am also facing the issue mentioned here #6. What subdirectory should I use if I don't know my user's folders? @chegele

chegele commented 1 year ago

Both windows and Linux operating systems have designated locations for storing temporary files. That may be a good option.

Linux: /tmp Windows: %temp%

josephrcox commented 1 year ago

Getting a different error just using "/temp" for MacOS

[12/27/2022, 2:42:48 PM] GENERAL Auto Git Update - Current version: 1.1.5
[12/27/2022, 2:42:48 PM] GENERAL Auto Git Update - Remote Version: 1.1.8.1
[12/27/2022, 2:42:48 PM] GENERAL Auto Git Update - Updating application from https://github.com/mapleweekend/easy-reddit-downloader
[12/27/2022, 2:42:49 PM] ERROR   Auto Git Update - Error updating application
[12/27/2022, 2:42:49 PM] ERROR   Error: EPERM: operation not permitted, unlink '/tmp/AutoGitUpdate/repo/logs/'
    at Object.unlinkSync (node:fs:1780:3)
    at /Users/josephcox/Documents/GitHub/reddit_post_downloader/node_modules/auto-git-update/index.js:226:16
    at Array.forEach (<anonymous>)
    at installUpdate (/Users/josephcox/Documents/GitHub/reddit_post_downloader/node_modules/auto-git-update/index.js:223:28)
    at AutoGitUpdate.forceUpdate (/Users/josephcox/Documents/GitHub/reddit_post_downloader/node_modules/auto-git-update/index.js:124:19)
    at async AutoGitUpdate.autoUpdate (/Users/josephcox/Documents/GitHub/reddit_post_downloader/node_modules/auto-git-update/index.js:85:16) {
  errno: -1,
  syscall: 'unlink',
  code: 'EPERM',
  path: '/tmp/AutoGitUpdate/repo/logs/'
chegele commented 1 year ago

Are you able to manually execute deletion commands using the same id as your application? An error indicating that the operation is not permitted leads me to think you need elevated privileges to work in that directory.

I am not too familiar with MacOS.