From c0986b4f4e024b2df22b273b3fd59f281836a6b7 Mon Sep 17 00:00:00 2001 From: Carlos Mora Date: Sun, 9 Dec 2012 16:26:00 +0100 Subject: [PATCH 1/5] Update core/MY_Model.php count_by and count_all() didn't take into account the soft-delete status in record counting. get_many_by() and get_all() does, so it looks better to follow the behavoir in the analogous method. --- core/MY_Model.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/MY_Model.php b/core/MY_Model.php index dc5412c..9d96a7a 100644 --- a/core/MY_Model.php +++ b/core/MY_Model.php @@ -569,6 +569,11 @@ public function count_by() $where = func_get_args(); $this->_set_where($where); + if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE) + { + $this->db->where($this->soft_delete_key, FALSE); + } + return $this->db->count_all_results($this->_table); } From d4bb43369d388fcc1cf89c9e06685f1c4e0ebabe Mon Sep 17 00:00:00 2001 From: Carlos Mora Date: Sun, 9 Dec 2012 16:33:07 +0100 Subject: [PATCH 2/5] Update core/MY_Model.php Not sure about this, ar's count_all operates independently of ar's status, the only way i found is to count_all_results(). --- core/MY_Model.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/MY_Model.php b/core/MY_Model.php index 9d96a7a..d598782 100644 --- a/core/MY_Model.php +++ b/core/MY_Model.php @@ -582,7 +582,17 @@ public function count_by() */ public function count_all() { - return $this->db->count_all($this->_table); + if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE) + { + $this->db->where($this->soft_delete_key, FALSE); + return $this->db->count_all_results($this->_table); + } + else + { + return $this->db->count_all($this->_table); + } + } + } /** From 1e4409ca989ccf41d4ca936ae4794b294dc47fbb Mon Sep 17 00:00:00 2001 From: Carlos Mora Date: Fri, 14 Dec 2012 11:34:08 +0100 Subject: [PATCH 3/5] Update core/MY_Model.php syntax error! --- core/MY_Model.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/MY_Model.php b/core/MY_Model.php index d598782..2176da9 100644 --- a/core/MY_Model.php +++ b/core/MY_Model.php @@ -593,9 +593,7 @@ public function count_all() } } - } - - /** + /** * Tell the class to skip the insert validation */ public function skip_validation() @@ -911,4 +909,4 @@ protected function _return_type($multi = FALSE) $method = ($multi) ? 'result' : 'row'; return $this->_temporary_return_type == 'array' ? $method . '_array' : $method; } -} \ No newline at end of file +} From d8a6a99e4fa932b5bb1fe047fbc9ce0bb073a7a1 Mon Sep 17 00:00:00 2001 From: Carlos Mora Date: Sat, 2 Mar 2013 19:24:51 +0100 Subject: [PATCH 4/5] Added with_count() for 1-n relationships, corresponding to the with() method --- ci-model.sublime-project | 8 + ci-model.sublime-workspace | 339 ++++++++++++++++++++++++++++++++++ core/MY_Model.php | 44 +++++ core/Notas personales con Git | 157 ++++++++++++++++ 4 files changed, 548 insertions(+) create mode 100644 ci-model.sublime-project create mode 100644 ci-model.sublime-workspace create mode 100644 core/Notas personales con Git diff --git a/ci-model.sublime-project b/ci-model.sublime-project new file mode 100644 index 0000000..e71b2d5 --- /dev/null +++ b/ci-model.sublime-project @@ -0,0 +1,8 @@ +{ + "folders": + [ + { + "path": "/Users/carlos/Sites/codeigniter-base-model" + } + ] +} diff --git a/ci-model.sublime-workspace b/ci-model.sublime-workspace new file mode 100644 index 0000000..892231d --- /dev/null +++ b/ci-model.sublime-workspace @@ -0,0 +1,339 @@ +{ + "auto_complete": + { + "selected_items": + [ + [ + "te", + "text-align" + ], + [ + "esc", + "escalera" + ], + [ + "B", + "Bancaria" + ], + [ + "he", + "helper" + ], + [ + "reco", + "record" + ], + [ + "po", + "post" + ], + [ + "pa", + "pasivos" + ], + [ + "su", + "sucur" + ], + [ + "pas", + "pasivo" + ], + [ + "strp", + "strpos" + ], + [ + "email", + "exif_thumbnail" + ], + [ + "pre", + "prevision" + ], + [ + "fun", + "function" + ], + [ + "sub", + "substr_count" + ], + [ + "s", + "style" + ], + [ + "f", + "file" + ], + [ + "var", + "var_dump" + ], + [ + "ex", + "exit" + ], + [ + "a", + "array $… = array (…)" + ], + [ + "g", + "group" + ], + [ + "for", + "foreach foreach …" + ], + [ + "va", + "var_dump" + ], + [ + "do", + "documentos" + ], + [ + "th", + "this" + ], + [ + "is", + "is_array" + ], + [ + "border-s", + "border-style" + ], + [ + "ba", + "base64_encode" + ], + [ + "base", + "base64_decode" + ] + ] + }, + "buffers": + [ + ], + "build_system": "", + "command_palette": + { + "height": 311.0, + "selected_items": + [ + [ + "Package Control: ", + "Package Control: Discover Packages" + ] + ], + "width": 400.0 + }, + "console": + { + "height": 0.0 + }, + "distraction_free": + { + "menu_visible": true, + "show_minimap": false, + "show_open_files": false, + "show_tabs": false, + "side_bar_visible": false, + "status_bar_visible": false + }, + "file_history": + [ + "/Users/carlos/Sites/helpdesk/helpdesk.sublime-project", + "/C/wamp/www/helpdesk/application/models/Tecnicos_emp_Model.php", + "/C/wamp/www/helpdesk/application/core/MY_Model.php", + "/C/wamp/www/helpdesk/application/libraries/User_Controller.php", + "/C/wamp/www/helpdesk/application/models/Empresas_model.php", + "/C/wamp/www/helpdesk/application/models/Users_Model.php", + "/C/wamp/www/helpdesk/application/controllers/admin/empresas.php", + "/C/wamp/www/helpdesk/application/views/admin/empresas/index.php", + "/C/wamp/www/www.tuxteam.com.ar/www/css/base-admin.css", + "/C/wamp/www/www.tuxteam.com.ar/www/css/main.css", + "/C/wamp/www/www.tuxteam.com.ar/application/views/layout/navigation.php", + "/C/Users/Carlos.GRUPOATISA/Documents/personal/pruebas.ep", + "/C/wamp/www/www.tuxteam.com.ar/application/config/config.php", + "/C/wamp/www/www.tuxteam.com.ar/application/config/database.php", + "/C/wamp/www/www.tuxteam.com.ar/application/config/autoload.php", + "/C/Users/Carlos.GRUPOATISA/AppData/Roaming/Sublime Text 2/Packages/User/Preferences.sublime-settings", + "/C/Users/Carlos.GRUPOATISA/AppData/Roaming/Sublime Text 2/Packages/User/PHP.sublime-settings", + "/C/wamp/www/endesa/application/core/MY_Model.php", + "/C/wamp/www/endesa/application/views/solicitudes/bancos_ok.php", + "/C/wamp/www/endesa/application/models/pasivos_model.php", + "/C/wamp/www/endesa/application/views/solicitudes/domicilio.php", + "/C/wamp/www/endesa/application/views/container/menu.php", + "/C/wamp/www/endesa/application/controllers/solicitudes.php", + "/C/wamp/www/endesa/application/models/prevision_model.php", + "/C/wamp/www/endesa/application/models/documentos_model.php", + "/C/wamp/www/endesa/application/views/solicitudes/bancos.php", + "/C/wamp/www/endesa/application/config/config.php", + "/C/wamp/www/endesa/application/views/solicitudes/pendientes.php", + "/C/wamp/www/endesa/application/controllers/auth.php", + "/C/wamp/www/endesa/application/views/auth/login.php", + "/C/Users/Carlos/AppData/Roaming/Sublime Text 2/Packages/User/phpcs.sublime-settings", + "/C/wamp/www/endesa/application/views/solicitudes/domicilio_ok.php", + "//webserver2/www/prejubiladosypasivosendesa.es/www/.htaccess", + "/C/wamp/www/endesa/application/controllers/documentos.php", + "/C/wamp/www/endesa/application/controllers/pasivos.php", + "/C/wamp/www/endesa/application/views/pasivos/prevision.php", + "/C/wamp/www/endesa/application/views/pasivos/fluido.php", + "/C/wamp/www/endesa/application/views/documentos/documentos.php", + "/C/wamp/www/endesa/www/css/endesa/bootstrap/less/bootstrap.less", + "/C/wamp/www/endesa/application/views/pasivos/view.php", + "/C/wamp/www/endesa/application/views/pasivos/beneficios.php", + "/C/wamp/www/endesa/application/views/pasivos/sevillana.php", + "/C/wamp/www/endesa/application/models/beneficios_model.php", + "/C/wamp/www/endesa/application/models/personas_model.php", + "/C/wamp/www/endesa/www/css/endesa/bootstrap/less/font-awesome.less", + "/C/wamp/www/endesa/application/views/personas/view.php", + "/C/wamp/www/endesa/application/views/pasivos/password.php", + "/C/wamp/www/endesa/application/views/documentos/fichero.php", + "/C/wamp/www/endesa/application/models/rf_calculos_traba_model.php", + "/C/wamp/www/endesa/application/models/ion_auth_model.php", + "/C/wamp/www/endesa/www/css/endesa/bootstrap/less/variables.less", + "/C/wamp/www/endesa/application/models/auth_model.php", + "/C/wamp/www/endesa/application/views/container.php", + "/C/wamp/www/endesa/application/controllers/personas.php", + "/C/wamp/www/endesa/application/views/auth/alta.php", + "/C/wamp/www/endesa/application/views/container/footer.php", + "/C/wamp/www/endesa/application/models/captcha_model.php", + "/C/wamp/www/endesa/application/views/documentos/download.php", + "/C/wamp/www/endesa/application/views/documentos/mod145blanco.php", + "/C/wamp/www/endesa/application/views/auth/testigo.php", + "/C/wamp/www/endesa/application/views/documentos/list.php", + "/C/wamp/www/endesa/application/views/welcome/view.php", + "/C/temp/tt/entropillc-bootstrap-verticaltabs-b08174f/index.html", + "/C/wamp/www/endesa/application/views/container/meta.php", + "/C/wamp/www/endesa/application/controllers/welcome.php", + "/C/wamp/www/endesa/www/css/dev204/footer.less", + "/C/wamp/www/endesa/www/css/endesa/bootstrap/less/bootstrap0.less", + "/C/wamp/www/endesa/www/css/endesa/base.less", + "/C/wamp/www/endesa/application/abstracts/AB_Base_Controller.php", + "/C/wamp/www/endesa/application/models/menu_model.php", + "/C/wamp/www/endesa/application/models/usuarios_model.php", + "/C/wamp/www/endesa/application/controllers/cambiar_clave.php", + "/C/wamp/www/endesa/application/config/database.php", + "/C/wamp/www/endesa/application/controllers/styles.php", + "/C/Users/Carlos/Desktop/5452_000001155424_25092012.n43" + ], + "find": + { + "height": 34.0 + }, + "find_in_files": + { + "height": 0.0, + "where_history": + [ + ] + }, + "find_state": + { + "case_sensitive": false, + "find_history": + [ + "_with", + "with", + "]?>", + "]?>\"/>", + " uneditable-input\"", + "$record[", + "/bootstrap220/", + "@import \"", + "/bootstrap/" + ], + "highlight": true, + "in_selection": false, + "preserve_case": false, + "regex": false, + "replace_history": + [ + ", $actual[])?>\"/>", + "\" value=\"", + "set_value(", + "$actual[", + "/bootstrap220/less/", + "@import \"../../../comun/bootstrap220/", + "/bootstrap220/" + ], + "reverse": false, + "show_context": true, + "use_buffer2": true, + "whole_word": false, + "wrap": true + }, + "groups": + [ + { + "sheets": + [ + ] + } + ], + "incremental_find": + { + "height": 0.0 + }, + "input": + { + "height": 31.0 + }, + "layout": + { + "cells": + [ + [ + 0, + 0, + 1, + 1 + ] + ], + "cols": + [ + 0.0, + 1.0 + ], + "rows": + [ + 0.0, + 1.0 + ] + }, + "menu_visible": true, + "replace": + { + "height": 62.0 + }, + "save_all_on_build": true, + "select_file": + { + "height": 0.0, + "selected_items": + [ + ], + "width": 0.0 + }, + "select_project": + { + "height": 0.0, + "selected_items": + [ + ], + "width": 0.0 + }, + "show_minimap": true, + "show_open_files": true, + "show_tabs": true, + "side_bar_visible": true, + "side_bar_width": 235.0, + "status_bar_visible": true +} diff --git a/core/MY_Model.php b/core/MY_Model.php index 1e298be..a395b42 100644 --- a/core/MY_Model.php +++ b/core/MY_Model.php @@ -523,6 +523,50 @@ public function relate($row) return $row; } + public function with_count($relationship) + { + $this->_with_count[] = $relationship; + + if (!in_array('relate_count', $this->after_get)) + { + $this->after_get[] = 'relate_count'; + } + + return $this; + } + + public function relate_count($row) + { + foreach ($this->has_many as $key => $value) + { + if (is_string($value)) + { + $relationship = $value; + $options = array( 'primary_key' => singular($this->_table) . '_id', 'model' => singular($value) . '_model' ); + } + else + { + $relationship = $key; + $options = $value; + } + + if (in_array($relationship, $this->_with_count)) + { + $this->load->model($options['model']); + if (is_object($row)) + { + $row->{$relationship} = $this->{$options['model']}->count_by($options['primary_key'], $row->{$this->primary_key}); + } + else + { + $row[$relationship] = $this->{$options['model']}->count_by($options['primary_key'], $row[$this->primary_key]); + } + } + } + + return $row; + } + /* -------------------------------------------------------------- * UTILITY METHODS * ------------------------------------------------------------ */ diff --git a/core/Notas personales con Git b/core/Notas personales con Git new file mode 100644 index 0000000..a48eadd --- /dev/null +++ b/core/Notas personales con Git @@ -0,0 +1,157 @@ +Notas personales con Git +Hoy 2/3 quise incorporar las novedades del repositorio original de Jammie. +Era la primera vez que lo intentaba con git. + +1.- decirle a mi copia cual es el proyecto superior: +git remote add upstream https://github.com/jamierumbelow/codeigniter-base-model.git + +2.- luego decirle que baje los cambios +git fetch upstream +remote: Counting objects: 26, done. +remote: Compressing objects: 100% (11/11), done. +remote: Total 21 (delta 10), reused 17 (delta 6) +Unpacking objects: 100% (21/21), done. +From https://github.com/jamierumbelow/codeigniter-base-model + * [new branch] master -> upstream/master + +3.- integrar los cambios de la rama upstream con la nuestra (master) +git merge upstream/master +Auto-merging core/MY_Model.php +CONFLICT (content): Merge conflict in core/MY_Model.php +Automatic merge failed; fix conflicts and then commit the result. + +4.- Acá marca problemas: git no ha sido capaz de mezclar el código que viene de una rama con +la nuestra. Le pediremos que nos muestre los conflictos: + +git diff +diff --cc core/MY_Model.php +index 2176da9,fcf1aa1..0000000 +--- a/core/MY_Model.php ++++ b/core/MY_Model.php +@@@ -569,12 -575,7 +575,16 @@@ class MY_Model extends CI_Mode + $where = func_get_args(); + $this->_set_where($where); + +++<<<<<<< HEAD + + if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE) + + { + + $this->db->where($this->soft_delete_key, FALSE); + + } + + + + return $this->db->count_all_results($this->_table); +++======= ++ return $this->_database->count_all_results($this->_table); +++>>>>>>> upstream/master + } + + /** +@@@ -582,18 -583,10 +592,22 @@@ + */ + public function count_all() + { +++<<<<<<< HEAD + + if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE) + + { + + $this->db->where($this->soft_delete_key, FALSE); + + return $this->db->count_all_results($this->_table); + + } + + else + + { + + return $this->db->count_all($this->_table); + + } +++======= ++ return $this->_database->count_all($this->_table); +++>>>>>>> upstream/master + } + - + - /** + + + + /** + * Tell the class to skip the insert validation + */ + public function skip_validation() + +el problema está en que cambie unos métodos, en particular unas líneas que usaban this->db, que +en la nueva versión se ha cambiado a this->_database, para usar diferentes db en cada modelo + +5.- cuando cargamos el archivo con conflictos en el editor, git nos ha insertado las marcas +anteriores, así tenemos las dos versiones del código para resolver por nosotros mismos +el conflicto. Editamos el código integrando los cambios manualmente. + + +6.- Confirmamos los cambios como siempre: + + git commit -a +[master 540d138] Merge remote-tracking branch 'upstream/master' +carlosmora:codeigniter-base-model carlos$ git status# On branch master +# Your branch is ahead of 'origin/master' by 7 commits. +# (use "git push" to publish your local commits) +# + +7.- Subir la version actualizada al repositorio. + +git push +warning: push.default is unset; its implicit value is changing in +Git 2.0 from 'matching' to 'simple'. To squelch this message +and maintain the current behavior after the default changes, use: + + git config --global push.default matching + +To squelch this message and adopt the new behavior now, use: + + git config --global push.default simple + +See 'git help config' and search for 'push.default' for further information. +(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode +'current' instead of 'simple' if you sometimes use older versions of Git) + +fatal: remote error: + You can't push to git://github.com/carlos-mora/codeigniter-base-model.git + Use git@github.com:carlos-mora/codeigniter-base-model.git + +¡No hizo nada! Por el mensaje, parece ser que la version nueva de git requiere de cierta +configuración. + +8.- +git config --global push.default simple +git push +fatal: remote error: + You can't push to git://github.com/carlos-mora/codeigniter-base-model.git + Use git@github.com:carlos-mora/codeigniter-base-model.git + +mierda! esto se esta poniendo pesado. Pruebo con el viejo estilo: + +git config --global push.default matching +git push +fatal: remote error: + You can't push to git://github.com/carlos-mora/codeigniter-base-model.git + Use git@github.com:carlos-mora/codeigniter-base-model.git + +Lo mismo. Probamos poniendo el nombre: + +git push git@github.com:carlos-mora/codeigniter-base-model.git +The authenticity of host 'github.com (207.97.227.239)' can't be established. +RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. +Are you sure you want to continue connecting (yes/no)? yes +Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts. +Permission denied (publickey). +fatal: Could not read from remote repository. + +Please make sure you have the correct access rights +and the repository exists. + +Parece que le jode porque active las claves ssh en bitbucket, y git las usa para github. + +9.- entro en mi cuenta de github y las añado. Intento de nuevo: + +git push git@github.com:carlos-mora/codeigniter-base-model.git +Counting objects: 33, done. +Delta compression using up to 8 threads. +Compressing objects: 100% (20/20), done. +Writing objects: 100% (25/25), 3.46 KiB, done. +Total 25 (delta 12), reused 0 (delta 0) +To git@github.com:carlos-mora/codeigniter-base-model.git + 1e4409c..540d138 master -> master + +éxito! Por fin! + From 8c5fa784c3040680075441979be04f56f6d98145 Mon Sep 17 00:00:00 2001 From: Carlos Mora Date: Sat, 2 Mar 2013 19:29:38 +0100 Subject: [PATCH 5/5] removed unwanted notes file --- core/Notas personales con Git | 157 ---------------------------------- 1 file changed, 157 deletions(-) delete mode 100644 core/Notas personales con Git diff --git a/core/Notas personales con Git b/core/Notas personales con Git deleted file mode 100644 index a48eadd..0000000 --- a/core/Notas personales con Git +++ /dev/null @@ -1,157 +0,0 @@ -Notas personales con Git -Hoy 2/3 quise incorporar las novedades del repositorio original de Jammie. -Era la primera vez que lo intentaba con git. - -1.- decirle a mi copia cual es el proyecto superior: -git remote add upstream https://github.com/jamierumbelow/codeigniter-base-model.git - -2.- luego decirle que baje los cambios -git fetch upstream -remote: Counting objects: 26, done. -remote: Compressing objects: 100% (11/11), done. -remote: Total 21 (delta 10), reused 17 (delta 6) -Unpacking objects: 100% (21/21), done. -From https://github.com/jamierumbelow/codeigniter-base-model - * [new branch] master -> upstream/master - -3.- integrar los cambios de la rama upstream con la nuestra (master) -git merge upstream/master -Auto-merging core/MY_Model.php -CONFLICT (content): Merge conflict in core/MY_Model.php -Automatic merge failed; fix conflicts and then commit the result. - -4.- Acá marca problemas: git no ha sido capaz de mezclar el código que viene de una rama con -la nuestra. Le pediremos que nos muestre los conflictos: - -git diff -diff --cc core/MY_Model.php -index 2176da9,fcf1aa1..0000000 ---- a/core/MY_Model.php -+++ b/core/MY_Model.php -@@@ -569,12 -575,7 +575,16 @@@ class MY_Model extends CI_Mode - $where = func_get_args(); - $this->_set_where($where); - -++<<<<<<< HEAD - + if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE) - + { - + $this->db->where($this->soft_delete_key, FALSE); - + } - + - + return $this->db->count_all_results($this->_table); -++======= -+ return $this->_database->count_all_results($this->_table); -++>>>>>>> upstream/master - } - - /** -@@@ -582,18 -583,10 +592,22 @@@ - */ - public function count_all() - { -++<<<<<<< HEAD - + if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE) - + { - + $this->db->where($this->soft_delete_key, FALSE); - + return $this->db->count_all_results($this->_table); - + } - + else - + { - + return $this->db->count_all($this->_table); - + } -++======= -+ return $this->_database->count_all($this->_table); -++>>>>>>> upstream/master - } - - - - /** - + - + /** - * Tell the class to skip the insert validation - */ - public function skip_validation() - -el problema está en que cambie unos métodos, en particular unas líneas que usaban this->db, que -en la nueva versión se ha cambiado a this->_database, para usar diferentes db en cada modelo - -5.- cuando cargamos el archivo con conflictos en el editor, git nos ha insertado las marcas -anteriores, así tenemos las dos versiones del código para resolver por nosotros mismos -el conflicto. Editamos el código integrando los cambios manualmente. - - -6.- Confirmamos los cambios como siempre: - - git commit -a -[master 540d138] Merge remote-tracking branch 'upstream/master' -carlosmora:codeigniter-base-model carlos$ git status# On branch master -# Your branch is ahead of 'origin/master' by 7 commits. -# (use "git push" to publish your local commits) -# - -7.- Subir la version actualizada al repositorio. - -git push -warning: push.default is unset; its implicit value is changing in -Git 2.0 from 'matching' to 'simple'. To squelch this message -and maintain the current behavior after the default changes, use: - - git config --global push.default matching - -To squelch this message and adopt the new behavior now, use: - - git config --global push.default simple - -See 'git help config' and search for 'push.default' for further information. -(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode -'current' instead of 'simple' if you sometimes use older versions of Git) - -fatal: remote error: - You can't push to git://github.com/carlos-mora/codeigniter-base-model.git - Use git@github.com:carlos-mora/codeigniter-base-model.git - -¡No hizo nada! Por el mensaje, parece ser que la version nueva de git requiere de cierta -configuración. - -8.- -git config --global push.default simple -git push -fatal: remote error: - You can't push to git://github.com/carlos-mora/codeigniter-base-model.git - Use git@github.com:carlos-mora/codeigniter-base-model.git - -mierda! esto se esta poniendo pesado. Pruebo con el viejo estilo: - -git config --global push.default matching -git push -fatal: remote error: - You can't push to git://github.com/carlos-mora/codeigniter-base-model.git - Use git@github.com:carlos-mora/codeigniter-base-model.git - -Lo mismo. Probamos poniendo el nombre: - -git push git@github.com:carlos-mora/codeigniter-base-model.git -The authenticity of host 'github.com (207.97.227.239)' can't be established. -RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. -Are you sure you want to continue connecting (yes/no)? yes -Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts. -Permission denied (publickey). -fatal: Could not read from remote repository. - -Please make sure you have the correct access rights -and the repository exists. - -Parece que le jode porque active las claves ssh en bitbucket, y git las usa para github. - -9.- entro en mi cuenta de github y las añado. Intento de nuevo: - -git push git@github.com:carlos-mora/codeigniter-base-model.git -Counting objects: 33, done. -Delta compression using up to 8 threads. -Compressing objects: 100% (20/20), done. -Writing objects: 100% (25/25), 3.46 KiB, done. -Total 25 (delta 12), reused 0 (delta 0) -To git@github.com:carlos-mora/codeigniter-base-model.git - 1e4409c..540d138 master -> master - -éxito! Por fin! -