From fdc06e39e209d700a837030e17420b466010307e Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Thu, 7 Jul 2022 01:30:19 -0700 Subject: [PATCH 1/2] Note that install's `-if` is now `-of` (#2634) * Note that install `-if` is now `-of` * Update migrating_to_2.0/commands.rst Co-authored-by: James * fix syntax highlight Co-authored-by: James --- migrating_to_2.0/commands.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/migrating_to_2.0/commands.rst b/migrating_to_2.0/commands.rst index e63d6ff82ba..a0644d34914 100644 --- a/migrating_to_2.0/commands.rst +++ b/migrating_to_2.0/commands.rst @@ -20,6 +20,7 @@ Remember that in Conan 1.X you have to specify the build profile or activate the $ conan install . [--name=mylib] [--version=1.0] [-pr:b=build_profile] [-pr:h=host_profile] +In addition the ``--install-folder`` has been replaced with ``--output-folder``. You might need to provide both arguments in Conan 1.X as some legacy generated files (``conaninfo.txt``, ``conanbuildinfo.txt``, etc) are not affected by ``--output-folder``. conan create ^^^^^^^^^^^^ From aab66eb1415beda1f1c462b091728c1add9862cb Mon Sep 17 00:00:00 2001 From: James Date: Thu, 7 Jul 2022 12:37:37 +0200 Subject: [PATCH 2/2] add credentials warning (#2636) Co-authored-by: Carlos Zoido --- reference/conanfile/tools/scm/git.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/reference/conanfile/tools/scm/git.rst b/reference/conanfile/tools/scm/git.rst index 520fc034538..b9588f0de3c 100644 --- a/reference/conanfile/tools/scm/git.rst +++ b/reference/conanfile/tools/scm/git.rst @@ -40,6 +40,12 @@ get_remote_url() Obtains the URL of the ``remote`` git remote repository, with ``git remote -v`` +.. warning:: + + This method will get the output from ``git remote -v``. If you added tokens or credentials to the remote in the URL, they will be + exposed. Credentials shouldn't be added to git remotes definitions, but using a credentials manager or similar mechanism. + If you still want to use this approach, it is your responsibility to strip the credentials from the result. + commit_in_remote() ------------------ @@ -104,6 +110,14 @@ get_url_and_commit() .. code-block:: python def get_url_and_commit(self, remote="origin") + # returns a (url, commit) tuple + + +.. warning:: + + This method will get the output from ``git remote -v``. If you added tokens or credentials to the remote in the URL, they will be + exposed. Credentials shouldn't be added to git remotes definitions, but using a credentials manager or similar mechanism. + If you still want to use this approach, it is your responsibility to strip the credentials from the result. This is an advanced method, that returns both the current commit, and the remote repository url.