How to connect to github app in internal account? #16717
Replies: 2 comments
-
🤖 Hello @mesturrica! I'm Dosu, an AI bot that can assist you with bug fixes, answer questions about LangChain, and help you become a contributor. While we're waiting for a human maintainer to jump in, feel free to ask me anything. Let's get started! The error message you're encountering typically indicates that the private key for your GitHub App is not correctly set up. The private key is used in the To resolve this issue, you need to ensure that the private key for your GitHub App is correctly generated and provided. Here are the steps to do so:
Here is an example of how you can read the private key from the with open('path_to_your_pem_file.pem', 'r') as file:
private_key = file.read()
auth = Auth.AppAuth(
github_app_id,
private_key,
) Please replace Remember to keep your private key secure and do not expose it in your code or version control system. You can find more information about this in the LangChain's GitHub utility. If you continue to experience issues, please provide more details about the steps you're taking and any additional error messages you're seeing. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
In the GitHub integration we need to pass a base url so that it will be able to generate the key. Otherwise it'll pass as api.github.com which would be invalid for a enterprise client
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
Hello! I'm getting an error while I try to integrate langchain's github utility with an internal app. I'm using an enterprise github account and while I try to execute the code, I receive the following error:
github.GithubException.GithubException: 401 {"message": "Integration must generate a public key", "documentation_url": "https://docs.github.com/rest"}
I've tested the code with a personal github account and it works. In this case, the app id generated has only 3 digit and not the 6 that documentation says.
System Info
Python version : 3.9.2
Beta Was this translation helpful? Give feedback.
All reactions