# Credentials with Private gem Repository for Logstash

**URL:** <https://discuss.elastic.co/t/credentials-with-private-gem-repository-for-logstash/261856>\
**Category:** Logstash\
**Created:** [January 21, 2021, 10:02pm UTC](https://discuss.elastic.co/t/credentials-with-private-gem-repository-for-logstash/261856 "2021-01-21T22:02:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_0/32/66801_2.png) [@jason\_0](https://discuss.elastic.co/u/jason_0)\
**Post date:** [January 21, 2021, 10:02pm UTC](https://discuss.elastic.co/t/credentials-with-private-gem-repository-for-logstash/261856/1 "2021-01-21T22:02:38Z")

</div>

Hi All,

Our Logstash servers don't have access to the Internet and instead we use a private repository available at [https://repo.domain.com](https://repo.domain.com) etc. This repo requires a username and password to access. Can we do this/how do we do this? I've tried setting the gem source to [https://user:pass@repo.domain.com](https://user:pass@repo.domain.com) but I get a 401 still (works fine if I test the same credentials from a browers)

```
[root@host ~]# /usr/share/logstash/bin/logstash-plugin install logstash-filter-elapsed
Using bundled JDK: /usr/share/logstash/jdk
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/jopenssl.jar) to field java.security.MessageDigest.provider
WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Validating logstash-filter-elapsed
Unable to download data from https://repo.domain.com/repository/rubygems/ - bad response Unauthorized 401 (https://repo.domain.com/repository/rubygems/latest_specs.4.8.gz)
ERROR: Installation aborted, verification failed for logstash-filter-elapsed
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 18, 2021, 10:03pm UTC](https://discuss.elastic.co/t/credentials-with-private-gem-repository-for-logstash/261856/2 "2021-02-18T22:03:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
