Repository Connector

Repository Connector FAQs

What should I do after I add locales to my Smartling project?

If you add locales to your project, you will need to update your translation configuration file (smartling-config.json) and add the new locales to the array. When the configuration file is uploaded, the Repository Connector will automatically update files in the Smartling dashboard based on your new settings.

Can I map one locale in Smartling to multiple locales in my repository?

No. All locale mappings are 1:1. If you have two similar locales, like es and es-ES best practice is to create both locales in Smartling and use Cross-Country Leverage to share translations.

Why aren't my source files being imported into Smartling?

The most common cause of this problem is an incorrect value in your smartling-config.json forresourceSets.pathRegex. You can validate your regular expression using an online tool such as RegexPlanet. Type your regular expression - make sure to remove the double-escaping required by JSON, so use only a single \ instead of \. Then provide some inputs of paths you want to match or not match and click ‘test’.


Once you have your Regular Expression working as you want inside RegexPlanet, make sure you restore the double escaping (\) needed to put your Regular Expression in a JSON file.

Why aren't my translated files appearing in my repository?

There are a few reasons translated files might not be appearing in your repository:

  • If your scheduler is set to update less frequently, it’s possible that you might just need to wait for the Repository Connector to check for new translations. You can update the scheduler in your repo-connector.conf.
  • By default the Repository Connector will only download a file when all translations are published. You can choose a less restrictive setting. For example, you can download the file once there are saved translations for all strings in a file. 
  • For a public repository, you may not have specified credentials. This would allow you to get source files from the repository but not push translations back. Make sure you have provided commit credentials for your repository in your repo-connector.conf
    Finally, you must provide a value for translationPathExpression for each resource set in your smartling-config.json, or translated files cannot be returned to your repository. See the previous answer for help tuning your Regular Expression.

Why are my translated files being re-uploaded to the Dashboard as original files?

The Repository Connector cannot automatically distinguish between an original file and a translated file in the repository. The Connector uploads files based on the value of resourceSets.pathRegex in your translation configuration file. If your regular expression makes use of wildcards or your translated files are downloaded to the same folder as your original files, it may be that both original and translated files will match the regular expression.

To avoid this problem, consider altering the structure and location of the original and translated resource files in your repository, or update your regular expression to make sure it only uploads resource files in the your project’s original language to Smartling.

Can I alter the configuration files while the Repository Connector is running?

You can alter the translation configuration file while the connector is running. If it is hosted in your code repository, any new commit to this file will trigger an automatic update to the Smartling dashboard. However, changes to the repo-connector.conf file require a restart.

What are my options for downloading translated files?

Smartling gives you a few advanced options for configuring how you get your translated files back from Smartling. To set these up, you need to add a downloadTranslations node on repository level to the repo-connector.conf file. The downloadTranslations node can contain the following parameters:

  • trigger - COMPLETED or ONCHANGE - determines when to download translated files from Smartling. COMPLETED downloads files only when all translations are complete. ONCHANGE downloads translated files whenever they are updated. Default is COMPLETED.
  • retrievalType - Sets type of translation for downloaded files. Allowed values are PUBLISHED (default), PENDING, and PSEUDO. 
  • IncludeOriginalStrings - If FALSE, Smartling returns the original string if there is no translations available. If TRUE, Smartling returns a blank string if there is no translations. Defaults to FALSE. This parameter is supported only for Gettext, java properties, custom XML, Android XML and JSON files. 

Can I upload/download resource files from all branches except my main (master) branch?

Sure. If you’d rather control your main branch via pull requests, you can set up the Repository Connector not to check the main branch. In the repo-connector.conf file, write your branches regular expression like this, to exclude your main branch:

"branches": "^(?!main).\\\*",

Why am I getting ‘repository not found’ or ‘cannot connect to git’ errors?

Repository Not Found errors are either caused by a network issue or by incorrect repository name/credentials. One way to check your credentials is to use the same name and credentials you use for the Repository Connector to try to clone your repository from the command line.

For example, with a username/password credential set:
git clone https://<user>:<password>

or with a personal access token:
git clone https://user:<personal access token>

If this action succeeds make sure that you have only one set of credentials in your repo-connector.conf. The example file comes with multiple possible credential configurations, commented out with # symbols. One of these may have been uncommented by mistake. Try deleting all credential sets except the one you are using.

If your credentials are correct it is likely that the server you host your Repository Connector on is not allowing outbound connections. You may have firewall issues.

Can the Repository Connector work behind a firewall?

In short, yes, but some extra work is required. First, your firewall needs to allow outbound connections both to Smartling and to your Repository. You will need to set up two rules in your Firewall configuration.

For Smartling API:

  • Protocol: TCP
  • Local ports: all ports
  • Remote ports: 443
  • Remote hosts:

For your Git repository:

  • Protocol: TCP
  • Local ports: all ports
  • Remote ports: 443
  • Remote hosts: {host of your git repository}

These outbound rules will allow the connector to work with Cron scheduling but will not allow the neccessary inbound connections for accepting callbacks from Smartling or Webhooks from your repository. For these you will need to create inbound rules for Smartling callbacks:

  • Protocol: TCP
  • Local ports: all ports
  • Remote ports: 443
  • Remote hosts:

Or for your Repository:

  • Protocol: TCP
  • Local ports: all ports
  • Remote ports: 443
  • Remote hosts: {ip address used by your repository provider for webhooks}

How much memory do I need to allocate?

On average, memory consumption for an instance of the Repository Connector is around 40M. We recommend having at least 64M available. You can define maximum memory allocation for the connector by starting with the -Xmx flag on startup. For example, to set the max memory to 64M: java -Xmx64M -jar repo-connector-1.4.2.jar -start

How do I control the size of my logs?

The Repository Connector uses logback. You can configure the length of history and the file size of your logs by editing the logback.xml file in the cfg directory. See the Logback documentation for full options.

What size AWS ec2 instance is appropriate for deploying?

Space requirements for the Repository Connector are not high. For most use cases, a micro instance will be sufficient.

I deleted a file in Smartling that was uploaded by the Repository Connector. Now the connector is showing errors: The file {fileUril} could not be found. What do I do?

As of version 1.5.3, deleting a file in Smartling that the Repository Connector is tracking will no longer cause failure. However, it’s still a good idea to keep your smartling-config.json up to date. If you want to delete a file in Smartling that is tracked by the Connector, follow these steps:

  1. Stop the connector with:
    java -jar repo-connector-{version}.jar -stop
  2. Edit your smartling-config.json file. Adjust the regular expression in the appropriate resourceSets entry so it doesn’t match the file you need to delete.
  3. Reset the connector by deleting the following folders from its directory:
  4. Delete the file in the Smartling Dashboard.
  5. Restart the connector.

Can I configure callbacks for completed translation instead of using the cron checker?

Yes, see the Configuring Webhooks section of Repository Connector Installation and Setup.

Can I automate uploads when I make a commit to my repository?

Yes, see the Configuring Webhooks section of Repository Connector Installation and Setup.


Can the Connector work from behind a proxy?

Yes. From version 1.5.1 onward, the Connector can work with a proxy. The following arguments need to be passed to the Connector on start:

  • http.proxyHost
  • http.proxyPort
  • http.proxyPassword
  • http.proxyUsername

Your startup command should look something like this:


java -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttp.proxyUsername=testuser -Dhttp.proxyPassword=password -jar repo-connector-1.5.1.jar -start

If you are having trouble connecting, try using curl to test your proxy connection with Smartling independently of the Repository Connector.

Can I see a complete configuration example with all optional parameters?

Sure! Download this complete repo-connector.conf example file, see comments for how each optional parameter is used. Recommended for advanced users only. If you use this file as a template to fill in your own information, remember to rename the file to repo-connector.conf.

We have different source content for each region, which are stored in different locations. Can I set up the connector to handle different source content?

/site/themes/templates/en-DE/* -> /site/themes/templates/de-DE/
/site/themes/templates/en-ES/* -> /site/themes/templates/es-ES/


SSL Issues

What do I do if the Repo Connector cannot start because of the following SSL error:

WARN Repository RepositoryKey[type=GIT,protocol=HTTP,,path=ios-app.git,branch=<null>] isn't working, error: hostname in certificate didn't match: <> != <*> OR <*> OR <>


The above error means that the Repo Connector tried to establish secure connection to and could not validate received SSL certificate. Below troubleshooting steps which can help to find root cause

Validate IP address
View IP address of

$ ping
PING ( 56(84) bytes of data.

Get information for host from DNS

$ dig

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.45.amzn1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5377
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 4

;             IN      A

;; ANSWER SECTION:      46      IN      CNAME 46 IN A 46 IN A

You can notice that IP address from the 1st step ( is different from the 2nd step. There is an issue, the Repo Connector sends a request to the wrong address, gets the wrong SSL certificate and fails on validation.

  • Reset DNS cash
  • Check if you use proxy and it has specific configuration

Validate certificate
Request SSL certificate and you must see something like below

$ openssl s_client -showcerts -connect | grep smartling
depth=3 C = US, O = "The Go Daddy Group, Inc.", OU = Go Daddy Class 2 Certification Authority
verify return:1
depth=2 C = US, ST = Arizona, L = Scottsdale, O = ", Inc.", CN = Go Daddy Root Certificate Authority - G2
verify return:1
depth=1 C = US, ST = Arizona, L = Scottsdale, O = ", Inc.", OU =, CN = Go Daddy Secure Certificate Authority - G2
verify return:1
depth=0 OU = Domain Control Validated, CN = *
verify return:1
 0 s:/OU=Domain Control Validated/CN=*
subject=/OU=Domain Control Validated/CN=*

Install certificate
It's not recommended workaround, better to update root CA certificates.

  1. Download certificate
    openssl s_client -servername -connect </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/smartling.crt
  2. Install certificate
    keytool -keystore keystore -importcert -alias smartling -file /tmp/smartling.crt


What do I do if the Repo Connector cannot start because of the following SSL error:

org.eclipse.jgit.api.errors.TransportException: https://xxxxx.git: cannot open git-upload-pack
Caused by: PKIX path building failed: unable to find valid certification path to requested target
	at Source) ~[na:1.8.0_91]


The problem you are facing is connected with https SSL certificate. The Repo Connector is a Java application.
Java does not recognize the root certificate authority, so you must import the required certificate.
Certificates usually located in '%java_folder%/lib/security/cacerts'
for example:


The path may depend on java version you are using.

  1. First, you can make a copy of the file with certificates
    cp /jdk1.6.0_24/jre/lib/security/cacerts /jdk1.6.0_24/jre/lib/security/cacerts.original
  2. (optional step). You may make sure that file with certificates does not contain the required certificate by running command and exploring result file:
    keytool -list -v -keystore /path/to/cacerts  > java_cacerts.txt

    Enter keystore password: changeit

  3. You should get the file with certificate (option: Export certificate from browser)
    Let's call it example.der
  4. Import the file:
    keytool -import -alias example -keystore  /path/to/cacerts -file example.der

    You will be prompted for a password, use 'changeit' and respond "yes" on whether to trust this key.

  5. (optional step). You may make sure that file with certificates contain the required certificate by running command from step 2.
  6. Now you can run the Repo Connector, and the issue should be gone.

How do I troubleshoot SSH key errors with GitHub repository?

GitHub may not accept your SSH key with the following error message

You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.

Please see for more information.

To resolve this, you should re-generate the key with the following command:

ssh-keygen -t ecdsa -b 256 -C ""

The command will generate a key with ECDSA encryption method. Currently, repo-connector (JGit library) doesn't accept other encryption methods (including ED25519).

Was this article helpful?