<p>Osmosis is able to read both XML and PBF files, but you need to change the command line to use <code>--read-xml</code> rather than <code>--read-pbf</code>. For example:</p>
<pre><code>osmosis --read-xml greater-london-latest.osm \
--write-apidb host="localhost" database="openstreetmap" \
user="openstreetmap" password="" validateSchemaVersion="no"
</code></pre>
<p>However, the error in your example is:</p>
<pre><code>The server requested password-based authentication, but no password was provided.
</code></pre>
<p>Which would suggest that you need to check that your database authentication is set up correctly. The most common reason for this is that the database user has no password set up at all and is using "ident" authentication over a local socket. Please read the <a href="https://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-PASSWORD">PostgreSQL documentation on authentication</a> and make sure you can login using <code>psql -h localhost -u openstreetmap openstreetmap</code>, then use the same credentials for Osmosis.</p>
<p>Please also have a look at the conversation around <a href="https://github.com/openstreetmap/openstreetmap-website/issues/282" class="issue-link js-issue-link" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/282" data-id="14300340" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#282</a>, which might have some useful tips. And, if you plan to edit the data afterwards, then update the primary key sequences to avoid issues such as <a href="https://github.com/openstreetmap/openstreetmap-website/issues/1542" class="issue-link js-issue-link" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/1542" data-id="228931648" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#1542</a>.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/1545#issuecomment-302863653">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLRhlbeuhEPI-S06xIIwSlyLVn2SXks5r7rqJgaJpZM4NhOy6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLdkeVjY6razDThhz4uE1r2UG9sKKks5r7rqJgaJpZM4NhOy6.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/issues/1545#issuecomment-302863653"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@zerebubuth in #1545: Osmosis is able to read both XML and PBF files, but you need to change the command line to use `--read-xml` rather than `--read-pbf`. For example:\r\n\r\n```\r\nosmosis --read-xml greater-london-latest.osm \\\r\n --write-apidb host=\"localhost\" database=\"openstreetmap\" \\\r\n user=\"openstreetmap\" password=\"\" validateSchemaVersion=\"no\"\r\n```\r\n\r\nHowever, the error in your example is:\r\n\r\n```\r\nThe server requested password-based authentication, but no password was provided.\r\n```\r\n\r\nWhich would suggest that you need to check that your database authentication is set up correctly. The most common reason for this is that the database user has no password set up at all and is using \"ident\" authentication over a local socket. Please read the [PostgreSQL documentation on authentication](https://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-PASSWORD) and make sure you can login using `psql -h localhost -u openstreetmap openstreetmap`, then use the same credentials for Osmosis.\r\n\r\nPlease also have a look at the conversation around #282, which might have some useful tips. And, if you plan to edit the data afterwards, then update the primary key sequences to avoid issues such as #1542."}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/1545#issuecomment-302863653"}}}</script>