Enveloppe / obsidian-enveloppe

Enveloppe helps you to publish your notes on a GitHub repository from your Obsidian Vault, for free!
https://enveloppe.github.io/
Apache License 2.0
633 stars 39 forks source link

[Plugin][Bug]: GitHub token is empty #200

Open eoan-ermine opened 1 year ago

eoan-ermine commented 1 year ago

Issue validation

Command used

No response

Plugin version

6.4.0

Describe the bug

I installed the plugin via Community Plugins, started configuring everything: set the repository name, username, generated a token and entered it. I pressed the Test connection button, and here is the result:

image

How to reproduce ?

No response

Minimal Reproducible Example

Obsidian v1.3.7, GitHub Publisher v6.4.0 installation with no other plugins

Configuration

{
  "github": {
    "branch": "master",
    "automaticallyMergePR": true,
    "tokenPath": "%configDir%/plugins/%pluginID%/env",
    "api": {
      "tiersForApi": "Github Free/Pro/Team (default)",
      "hostname": ""
    },
    "workflow": {
      "commitMessage": "[PUBLISHER] Merge",
      "name": ""
    },
    "verifiedRepo": true
  },
  "upload": {
    "behavior": "fixed",
    "defaultName": "",
    "rootFolder": "",
    "yamlFolderKey": "",
    "frontmatterTitle": {
      "enable": false,
      "key": "title"
    },
    "replaceTitle": [],
    "replacePath": [],
    "autoclean": {
      "enable": false,
      "excluded": []
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md"
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": true,
    "censorText": [],
    "tags": {
      "inline": false,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": false,
      "unshared": false,
      "wiki": false,
      "slugify": false
    }
  },
  "embed": {
    "attachments": true,
    "keySendFile": [],
    "notes": false,
    "folder": "",
    "convertEmbedToLinks": "keep",
    "charConvert": "->"
  }
}

Relevant log output

No response

OS

Linux

Anything else?

No response

Obsidian information

SYSTEM INFO:
    Obsidian version: v1.3.7
    Installer version: v1.3.7
    Operating system: #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 6.2.0-26-generic
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: off
    Plugins installed: 1
    Plugins enabled: 1
        1: Github Publisher v6.4.0

RECOMMENDATIONS:
    Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
Mara-Li commented 1 year ago

Did you open the env in the plugin folder (.obsidian\plugins\obsidian-mkdocs-publisher) and check if the token is written ?

eoan-ermine commented 1 year ago

Did you open the env in the plugin folder (.obsidian\plugins\obsidian-mkdocs-publisher) and check if the token is written ?

I have no idea, but now it's saves fine.

However, it writes that the repository was not found despite the fact that the token has rights to the repositories and the repository really exists

image

image

When I change repository visibility to public, it's all fine.

eoan-ermine commented 1 year ago

Is it intended behavior?

Mara-Li commented 1 year ago

Hmmm, it's pretty strange, I don't have the problem on my side, so I don't understand why. Maybe a problem around the token ?

vrushin10 commented 1 year ago

i am having the same problem

image

i am using windows and it was not creating a env file in the path specified

Mara-Li commented 1 year ago

What do you have in the console ? I tried a reproduction in a new vault + sandbox and can't repro…

Mara-Li commented 1 year ago

I made a little update for the token in the plugin, where you can use a JSON syntax instead of the basic env.

Could you try it? You just need to add .json at the end of the path!

vrushin10 commented 1 year ago

so how do i format it ? is it like this { "key":mykey } can you give me an example

Mara-Li commented 1 year ago

Nothing change in the settings, just paste the key as before. Don't forget to open the console (CTRL + MAJ + I) to capture the log if anything pop.