obsidian-enveloppe icon indicating copy to clipboard operation
obsidian-enveloppe copied to clipboard

[Plugin][Bug]: GitHub token is empty

Open eoan-ermine opened this issue 10 months ago • 9 comments

Issue validation

  • [X] I checked the issue to prevent duplicate
  • [X] I checked my configurations files and the documentation

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.

eoan-ermine avatar Aug 19 '23 18:08 eoan-ermine

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

Mara-Li avatar Aug 19 '23 18:08 Mara-Li

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 avatar Aug 19 '23 18:08 eoan-ermine

Is it intended behavior?

eoan-ermine avatar Aug 19 '23 18:08 eoan-ermine

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 ?

Mara-Li avatar Aug 19 '23 19:08 Mara-Li

i am having the same problem

image

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

vrushin10 avatar Oct 04 '23 20:10 vrushin10

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

Mara-Li avatar Oct 04 '23 20:10 Mara-Li

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!

Mara-Li avatar Oct 06 '23 18:10 Mara-Li

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

vrushin10 avatar Oct 10 '23 12:10 vrushin10

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.

Mara-Li avatar Oct 10 '23 13:10 Mara-Li