-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add SSH Key field when making git datasources #15394
Comments
Would love to see this implemented |
Please do implement this. My local git repo requires SSH keys to authenticate. Given the complexity of maintaining SSH keys, IMHO it would be worth splitting out the authentication methods from the data sources at this point and creating a 'Credential' model to store the keys in the DB. The Credential model would be one of either username/password combination or SSH key and optional password. The datasource would have a foreign key relationship to the credential making the credential re-usable across several datasources if desired. If Dulwich needs the key in a file (I'll admit to only cursory glances at the docs), then the key would need to be written to a temporary file when any remote file sync activity takes place. |
This is open for volunteers. |
Does someone know how to even provide the keyfile to SyncError('Fetching remote data failed (HangupException): git@github.com: Permission denied (publickey).\r') I don't seem to find any example anywhere. (aaand update: |
Workaround to use SSH key: Add this in
and restart the service:
Limitation: You can only select one keyfile --> If you have more than one data source, you need to authorize the same private key to access all those data sources. |
Well this is exciting. I got this to work with no code changes...though this is dirty and I'm almost sure it goes against some kind of practice. I have successfully gotten this to work with multiple repos with multiple keys. Here's how I did it: We are going to be enabling login on the local netbox user on the host server! If you don't want to do this, then sorry you can't do this
|
NetBox version
3.6.3
Feature type
New functionality
Proposed functionality
This is in regards to #14941
Add a field that allows a user to supply a path to an SSH key file to use to authenticate to GitHub.
Use case
GitHub enterprise tenants with Managed Users require the use of an external IdP to authenticate to GitHub. Username and password authentication will not work to the API or to login. Allowing the use of SSH keys allows people using an EMU instance (or just preference) to use git over SSH.
Database changes
Most likely need a new field that will allow a user to supply a SSH key path. I can see a use case for requiring multiple different keys
External dependencies
No response
The text was updated successfully, but these errors were encountered: