Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
eoan-ermine opened this issue Aug 19, 2023 · 9 comments
Open
2 tasks done

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

eoan-ermine opened this issue Aug 19, 2023 · 9 comments
Assignees
Labels
❓ Question Further information is requested 🔁 No reproduction Where I can't repro the bug 💤 Stale Inactive issue

Comments

@eoan-ermine
Copy link

eoan-ermine commented Aug 19, 2023

Issue validation

  • I checked the issue to prevent duplicate
  • 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 eoan-ermine added 🐛 Bug Something isn't working 💎 Obsidian Github Publisher Related to the plugin labels Aug 19, 2023
@Mara-Li
Copy link
Member

Mara-Li commented Aug 19, 2023

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

@eoan-ermine
Copy link
Author

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
Copy link
Author

Is it intended behavior?

@Mara-Li
Copy link
Member

Mara-Li commented Aug 19, 2023

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 Mara-Li added the 💤 Stale Inactive issue label Aug 22, 2023
@vrushin10
Copy link

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
Copy link
Member

Mara-Li commented Oct 4, 2023

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

@Mara-Li
Copy link
Member

Mara-Li commented Oct 6, 2023

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 Mara-Li added ❓ Question Further information is requested 🔁 No reproduction Where I can't repro the bug labels Oct 9, 2023
@vrushin10
Copy link

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

@Mara-Li
Copy link
Member

Mara-Li commented Oct 10, 2023

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 added a commit that referenced this issue Jan 26, 2024
Also fixes error with token (related to #200)
@Mara-Li Mara-Li removed 🐛 Bug Something isn't working 💎 Obsidian Github Publisher Related to the plugin labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ Question Further information is requested 🔁 No reproduction Where I can't repro the bug 💤 Stale Inactive issue
Projects
None yet
Development

No branches or pull requests

3 participants