diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index c5f7c03c..3a025624 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -100,6 +100,10 @@ class GitSM(Git):
                 # Properly formated URL already
                 proto = uris[module].split(':', 1)[0]
                 url = uris[module].replace('%s:' % proto, 'gitsm:', 1)
+                # remove user+password from string to add them as parameter
+                if ud.user in url:
+                    url = url.replace(ud.user + '@', '')
+                    url += ";user=%s" % ud.user
             else:
                 if ":" in uris[module]:
                     # Most likely an SSH style reference
