GitHub Agent Config
Create a new file in the /etc/systemd/system/instana-agent.service.d/ directory with the extension .conf, such as git-configuration-environments.conf.
Add the following content to the file:
[Service]
Environment=INSTANA_GIT_REMOTE_BRANCH=<branch>
Environment=INSTANA_GIT_REMOTE_REPOSITORY=<repository_url>
Environment=INSTANA_GIT_REMOTE_USERNAME=<username>
Environment=INSTANA_GIT_REMOTE_PASSWORD=<access_token>
``` **Notes:**
- Replace *<branch>* with the name of the remote branch that the Instana host agent connects to.
- Replace *<repository_url>* with the URL of the remote Git repository; for example, `https://github.com/<your_account>/<your_repo>.git`.
- Replace *<username>* with a username or access token (for basic authentication). If you are using a `.netrc` file or a public repository, you can remove the whole line `Environment=INSTANA_GIT_REMOTE_USERNAME=<username>`.
- Replace *<access_token>* with an access token. If you are using an access token as username (basic authentication), a `.netrc` file, or a public repository, you can remove the whole line `Environment=INSTANA_GIT_REMOTE_PASSWORD=<access_token>`.
my config :
[root@linux instana-agent.service.d]# pwd
/etc/systemd/system/instana-agent.service.d
[root@linux instana-agent.service.d]# ls
custom-environment.conf git-configuration-environments.conf
[root@linux instana-agent.service.d]# cat git-configuration-environments.conf
[Service]
Environment=INSTANA_GIT_REMOTE_BRANCH=main
Environment=INSTANA_GIT_REMOTE_REPOSITORY=https://github.com/mabu-ibm/github.git
Environment=INSTANA_GIT_REMOTE_USERNAME=mabu-ibm
Environment=INSTANA_GIT_REMOTE_PASSWORD= github token
``` **Notes:**
- Replace *<branch>* with the name of the remote branch that the Instana host agent connects to.
- Replace *<repository_url>* with the URL of the remote Git repository; for example, `https://github.com/<your_account>/<your_repo>.git`.
- Replace *<username>* with a username or access token (for basic authentication). If you are using a `.netrc` file or a public repository, you can remove the whole line `Environment=INSTANA_GIT_REMOTE_USERNAME=<username>`.
- Replace *<access_token>* with an access token. If you are using an access token as username (basic authentication), a `.netrc` file, or a public repository, you can remove the whole line `Environment=INSTANA_GIT_REMOTE_PASSWORD=<access_token>`.
my Github Repo Structure