n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
46.49k stars 6.67k forks source link

GitHub Document Loader node does not support GitHub Enterprise self-hosted URLs #11037

Open a-d-r-i-a-n-d opened 1 day ago

a-d-r-i-a-n-d commented 1 day ago

Bug Description

The GitHub Document Loader node in n8n does not seem to accept repository URLs from GitHub Enterprise self-hosted instances. When using a repository link such as https://github.example.io/CompanyName/name-of-the-project, the node throws an error: Error in sub-node ‘GitHub Document Loader‘ Invalid GitHub URL format.

The GitHub API credentials were successfully added and the connection was tested successfully using the GitHub server URL https://github.example.io/api/v3. However, the node does not appear to recognize the self-hosted repository URL format.

This issue prevents users from using the GitHub Document Loader with GitHub Enterprise self-hosted repositories, limiting its functionality for enterprise users. I am using this node in conjunction with the Postgres PGVector Store node, OpenAI embeddings, and the Recursive Character Text Splitter node.

To Reproduce

  1. Set up GitHub Enterprise credentials: • In n8n, go to settings and add your GitHub API credentials using a GitHub Enterprise self-hosted instance. • Set the GitHub server URL to https://github.example.io/api/v3. • Test the connection to ensure it is successful.
  2. Set up a workflow: • Add the GitHub Document Loader node. •Enter a repository URL from your GitHub Enterprise instance, such as https://github.example.io/CompanyName/name-of-the-project. • Add a Postgres PGVector Store node and configure it with OpenAI embeddings. • Use the Recursive Character Text Splitter node for text processing.
  3. Run the workflow: • Execute the workflow and observe the error in the GitHub Document Loader node: Error in sub-node ‘GitHub Document Loader‘ Invalid GitHub URL format.

Expected behavior

• The GitHub Document Loader node should accept and process repository URLs from GitHub Enterprise self-hosted instances, such as https://github.example.io/CompanyName/name-of-the-project. • The node should properly integrate with GitHub Enterprise instances using the provided API credentials and server URL (e.g., https://github.example.io/api/v3). • Users should be able to load documents from self-hosted repositories without encountering invalid URL format errors.

Operating System

docker

n8n Version

1.59.4

Node.js Version

v20.17.0

Database

PostgreSQL

Execution mode

main (default)

Joffcom commented 1 day ago

Hey @a-d-r-i-a-n-d,

We have created an internal ticket to look into this which we will be tracking as "GHC-273"

a-d-r-i-a-n-d commented 20 hours ago

Thanks @OlegIvaniv, much appreciated. I will give that a test and close the issue after.

janober commented 15 hours ago

Fix got released with n8n@1.62.1

a-d-r-i-a-n-d commented 14 hours ago

@OlegIvaniv @janober Unfortunately it doesn't work. I've tried recreating the Github API credentials and workflow from scratch but it didn't helped. There are some logs at the bottom, if you need anything else please let me know.

Debug info

core

storage

pruning

Generated at: 2024-10-02T15:53:12.078Z

Logs with debug enabled ```log n8n-1 | 2024-10-02T15:47:37.358Z | debug | Execution added {"executionId":"730","file":"active-executions.js","function":"add"} n8n-1 | 2024-10-02T15:47:37.363Z | debug | Execution for workflow Github Enterprise was assigned id 730 {"executionId":"730","file":"workflow-runner.js","function":"runMainProcess"} n8n-1 | 2024-10-02T15:47:37.365Z | debug | Execution ID 730 will run executing all nodes. {"executionId":"730","file":"workflow-runner.js","function":"runMainProcess"} n8n-1 | 2024-10-02T15:47:37.365Z | debug | Workflow execution started {"workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.367Z | debug | Executing hook (hookFunctionsPush) {"executionId":"730","pushRef":"uwrde6nbfh","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"workflowExecuteBefore"} n8n-1 | 2024-10-02T15:47:37.367Z | debug | Send data of type "executionStarted" to editor-UI {"dataType":"executionStarted","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.368Z | debug | Start processing node "When clicking ‘Test workflow’" {"node":"When clicking ‘Test workflow’","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.369Z | debug | Executing hook on node "When clicking ‘Test workflow’" (hookFunctionsPush) {"executionId":"730","pushRef":"uwrde6nbfh","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"nodeExecuteBefore"} n8n-1 | 2024-10-02T15:47:37.369Z | debug | Send data of type "nodeExecuteBefore" to editor-UI {"dataType":"nodeExecuteBefore","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.369Z | debug | Running node "When clicking ‘Test workflow’" started {"node":"When clicking ‘Test workflow’","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.370Z | debug | Running node "When clicking ‘Test workflow’" finished successfully {"node":"When clicking ‘Test workflow’","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.370Z | debug | Executing hook on node "When clicking ‘Test workflow’" (hookFunctionsPush) {"executionId":"730","pushRef":"uwrde6nbfh","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"nodeExecuteAfter"} n8n-1 | 2024-10-02T15:47:37.370Z | debug | Send data of type "nodeExecuteAfter" to editor-UI {"dataType":"nodeExecuteAfter","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.370Z | debug | Start processing node "Edit Fields" {"node":"Edit Fields","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.370Z | debug | Executing hook on node "Edit Fields" (hookFunctionsPush) {"executionId":"730","pushRef":"uwrde6nbfh","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"nodeExecuteBefore"} n8n-1 | 2024-10-02T15:47:37.371Z | debug | Send data of type "nodeExecuteBefore" to editor-UI {"dataType":"nodeExecuteBefore","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.371Z | debug | Running node "Edit Fields" started {"node":"Edit Fields","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.371Z | debug | Running node "Edit Fields" finished successfully {"node":"Edit Fields","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.372Z | debug | Executing hook on node "Edit Fields" (hookFunctionsPush) {"executionId":"730","pushRef":"uwrde6nbfh","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"nodeExecuteAfter"} n8n-1 | 2024-10-02T15:47:37.372Z | debug | Send data of type "nodeExecuteAfter" to editor-UI {"dataType":"nodeExecuteAfter","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.372Z | debug | Start processing node "Postgres PGVector Store" {"node":"Postgres PGVector Store","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.372Z | debug | Executing hook on node "Postgres PGVector Store" (hookFunctionsPush) {"executionId":"730","pushRef":"uwrde6nbfh","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"nodeExecuteBefore"} n8n-1 | 2024-10-02T15:47:37.372Z | debug | Send data of type "nodeExecuteBefore" to editor-UI {"dataType":"nodeExecuteBefore","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.373Z | debug | Running node "Postgres PGVector Store" started {"node":"Postgres PGVector Store","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.373Z | debug | Supply data for embeddings {"file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | Supplying data for Github Document Loader n8n-1 | 2024-10-02T15:47:37.380Z | debug | Supply Data for Text Splitter {"file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.380Z | debug | Send data of type "nodeExecuteBefore" to editor-UI {"dataType":"nodeExecuteBefore","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.381Z | debug | Send data of type "nodeExecuteBefore" to editor-UI {"dataType":"nodeExecuteBefore","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.381Z | error | ApplicationError: Error in sub-node GitHub Document Loader {"file":"LoggerProxy.js","function":"exports.error"} n8n-1 | 2024-10-02T15:47:37.382Z | debug | Running node "Postgres PGVector Store" finished with error {"node":"Postgres PGVector Store","workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.382Z | debug | Executing hook on node "Postgres PGVector Store" (hookFunctionsPush) {"executionId":"730","pushRef":"uwrde6nbfh","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"nodeExecuteAfter"} n8n-1 | 2024-10-02T15:47:37.382Z | debug | Send data of type "nodeExecuteAfter" to editor-UI {"dataType":"nodeExecuteAfter","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.384Z | debug | Workflow execution finished with error {"error":{"level":"error","tags":{},"context":{"itemIndex":0},"functionality":"configuration-node","name":"NodeOperationError","timestamp":1727884057381,"node":{"parameters":{"notice":"","repository":"={{ $json.Repository_Link }}","branch":"master","additionalOptions":{}},"id":"d26c1c9b-3d45-4747-a1c2-676ed68f579d","name":"GitHub Document Loader","type":"@n8n/n8n-nodes-langchain.documentGithubLoader","typeVersion":1,"position":[660,680],"credentials":{"githubApi":{"id":"qXCIeuKgj7r0XADP","name":"GitHub account"}}},"messages":[],"description":"Invalid GitHub URL format.","message":"Error in sub-node GitHub Document Loader","stack":"NodeOperationError: Error in sub-node GitHub Document Loader\n at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1850:19\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Promise.all (index 0)\n at Object.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1857:19)\n at Object.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2296:24)\n at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/shared/createVectorStoreNode.js:196:36)\n at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:722:19)\n at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:711:51\n at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1141:20"},"workflowId":"GdoQ9CNq9odMGAPK","file":"LoggerProxy.js","function":"exports.debug"} n8n-1 | 2024-10-02T15:47:37.384Z | debug | Executing hook (hookFunctionsSave) {"executionId":"730","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"workflowExecuteAfter"} n8n-1 | 2024-10-02T15:47:37.384Z | debug | Save execution data to database for execution ID 730 {"executionId":"730","workflowId":"GdoQ9CNq9odMGAPK","finished":false,"stoppedAt":"2024-10-02T15:47:37.383Z","file":"shared-hook-functions.js","function":"updateExistingExecution"} n8n-1 | 2024-10-02T15:47:37.389Z | debug | Executing hook (hookFunctionsPush) {"executionId":"730","pushRef":"uwrde6nbfh","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"workflowExecuteAfter"} n8n-1 | 2024-10-02T15:47:37.390Z | debug | Save execution progress to database for execution ID 730 {"executionId":"730","workflowId":"GdoQ9CNq9odMGAPK","file":"workflow-execute-additional-data.js","function":"workflowExecuteAfter"} n8n-1 | 2024-10-02T15:47:37.390Z | debug | Send data of type "executionFinished" to editor-UI {"dataType":"executionFinished","pushRefs":"uwrde6nbfh","file":"abstract.push.js","function":"sendTo"} n8n-1 | 2024-10-02T15:47:37.390Z | debug | Execution finalized {"executionId":"730","file":"active-executions.js","function":"finalizeExecution"} n8n-1 | 2024-10-02T15:47:37.390Z | debug | Execution removed {"executionId":"730","file":"active-executions.js"} n8n-1 | 2024-10-02T15:47:37.402Z [Rudder] debug: no existing flush timer, creating new one n8n-1 | 2024-10-02T15:47:47.404Z [Rudder] debug: in flush n8n-1 | 2024-10-02T15:47:47.404Z [Rudder] debug: cancelling existing flushTimer...